Use the email address when looking for existing Google Account records
If Gerrit is aliased under multiple DNS names and/or HTTP ports we may have asked Google Accounts to generate us different OpenID strings for the same user identity. By looking for an existing Google Account key using the email address we can avoid creating a duplicate account for the user if they login to the same database, but through a CNAME alias. Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -30,4 +30,7 @@ public interface AccountExternalIdAccess extends
|
||||
|
||||
@Query("WHERE key.accountId = ?")
|
||||
ResultSet<AccountExternalId> byAccount(Account.Id id) throws OrmException;
|
||||
|
||||
@Query("WHERE emailAddress = ?")
|
||||
ResultSet<AccountExternalId> byEmailAddress(String email) throws OrmException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user