-username=$(
- curl -s -H 'Accept: application/json' \
- "$nordix_gerrit_rest/accounts/?q=email:$GERRIT_EVENT_ACCOUNT_EMAIL&o=DETAILS" \
- | tee /dev/stderr | tail -1 | jq -r '.[0].username')
+#username=$(
+# curl -s -H 'Accept: application/json' \
+# "$nordix_gerrit_rest/accounts/?q=email:$GERRIT_EVENT_ACCOUNT_EMAIL&o=DETAILS" \
+# | tee /dev/stderr | tail -1 | jq -r '.[0].username')
+
+# read user name from the commit details which allows nordix user name to be different to lfid
+username=$(git show -s --pretty=%an)
+
+pattern=" "
+if [[ "$username" =~ $pattern ]]
+then
+ echo "Incorrect username, use Linux Foundation ID as git user.name when pushing to Nordix"
+ echo "Use command git config --global user.name <LFID>"
+ exit 1
+fi