Correct handling of gerrit id in user profiles

Closes bug 1357203

Change-Id: Ic025bacaa2b0c1c292882b9c94faaacd802934bf
Merge "Correct handling of gerrit id in user profiles"