Automatically set preferred_email to first configured address

If a user creates a new account without an email address initially
preferred_email will be NULL.  If they later register an email by
our email link verification process we should automatically set
the preferred_email field to the first email configured on the
user account.

Bug: issue 319
Change-Id: Id156d2c7ba5031eb8d9c2310dba017098494790b
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed