Commit 4e2ddad2 authored by Tiago Botelho's avatar Tiago Botelho

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

parent d55216c0
......@@ -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 }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment