Only add identities to a user if we find one in Gitlab::OAuth::User.
This commit is contained in:
parent
d55216c092
commit
4e2ddad2bb
|
|
@ -64,6 +64,8 @@ module Gitlab
|
|||
protected
|
||||
|
||||
def add_or_update_user_identities
|
||||
return unless gl_user
|
||||
|
||||
# find_or_initialize_by doesn't update `gl_user.identities`, and isn't autosaved.
|
||||
identity = gl_user.identities.find { |identity| identity.provider == auth_hash.provider }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue