Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Fletcher <markglenfletcher@googlemail.com>2018-02-19 15:36:21 +0300
committerMark Fletcher <markglenfletcher@googlemail.com>2018-02-19 15:36:21 +0300
commit76f3921140e10e195db8271217b675402b679609 (patch)
tree512eb9fbd83d04c406861134c8eb99afc875fc58 /lib/gitlab/o_auth/user.rb
parentdcd1a43faf9654bf6e36d47d88dc914a100c4e33 (diff)
parent27a6d876cb690526713baea49ceea2d6dde75417 (diff)
Merge branch '10-5-stable-prepare-rc9' into '10-5-stable'
Prepare 10.5 RC9 release See merge request gitlab-org/gitlab-ce!17210
Diffstat (limited to 'lib/gitlab/o_auth/user.rb')
-rw-r--r--lib/gitlab/o_auth/user.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb
index a3e1c66c19f..28ebac1776e 100644
--- a/lib/gitlab/o_auth/user.rb
+++ b/lib/gitlab/o_auth/user.rb
@@ -198,9 +198,11 @@ module Gitlab
end
def update_profile
+ clear_user_synced_attributes_metadata
+
return unless sync_profile_from_provider? || creating_linked_ldap_user?
- metadata = gl_user.user_synced_attributes_metadata || gl_user.build_user_synced_attributes_metadata
+ metadata = gl_user.build_user_synced_attributes_metadata
if sync_profile_from_provider?
UserSyncedAttributesMetadata::SYNCABLE_ATTRIBUTES.each do |key|
@@ -221,6 +223,10 @@ module Gitlab
end
end
+ def clear_user_synced_attributes_metadata
+ gl_user&.user_synced_attributes_metadata&.destroy
+ end
+
def log
Gitlab::AppLogger
end