Merge branch '38801-add-or-update-identities-should-only-work-if-gl-user-exists' into 'master'
Only add identities to a user if we find one in Gitlab::OAuth::User. Closes #38801 See merge request gitlab-org/gitlab-ce!14702
This commit is contained in:
commit
3594a67d30
|
@ -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