userid-validation: adapt to new gerrit email permission

The latest gerrit no longer allows users without account modification
permissions to look up users with secondary email addresses. So if
someone uploads a commit to gerrit using a secondary email, this script
no longer can determine if they are approved.

Utilize the gerrit query command to look up the username of a commit.

Tested:
- Confirmed that with this change that a previously failing autobump
  commit was properly given the ok-to-test +1

Change-Id: Ia44149bb4605261bb3451d4f491051df7fd0bbd4
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
1 file changed