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
path: root/lib
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-01-24 16:52:31 +0300
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-01-30 18:30:25 +0300
commit1ab85b9696646bbd5aa8b0da4db35108b36e5d63 (patch)
tree7922fe51671c5f350a6eb503d65f790357ab9bee /lib
parentd772f52e1ec5848b00fc590606d33645f0799eb5 (diff)
Only new users get marked as external
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/o_auth/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/o_auth/user.rb b/lib/gitlab/o_auth/user.rb
index fff9360ea27..e40a001d20c 100644
--- a/lib/gitlab/o_auth/user.rb
+++ b/lib/gitlab/o_auth/user.rb
@@ -55,7 +55,7 @@ module Gitlab
user ||= find_or_build_ldap_user if auto_link_ldap_user?
user ||= build_new_user if signup_enabled?
- user.external = true if external_provider? && user
+ user.external = true if external_provider? && user&.new_record?
user
end