Skip to content
Snippets Groups Projects
Commit 4e2ddad2 authored by Tiago Botelho's avatar Tiago Botelho
Browse files

Only add identities to a user if we find one in Gitlab::OAuth::User.

parent d55216c0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment