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:
Diffstat (limited to 'lib/gitlab/auth/o_auth/auth_hash.rb')
-rw-r--r--lib/gitlab/auth/o_auth/auth_hash.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab/auth/o_auth/auth_hash.rb b/lib/gitlab/auth/o_auth/auth_hash.rb
index cce08750296..c2b49c1c068 100644
--- a/lib/gitlab/auth/o_auth/auth_hash.rb
+++ b/lib/gitlab/auth/o_auth/auth_hash.rb
@@ -68,7 +68,7 @@ module Gitlab
end
def provider_config
- Gitlab::Auth::OAuth::Provider.config_for(@provider) || {}
+ Gitlab::Auth::OAuth::Provider.config_for(provider) || {}
end
def provider_args
@@ -96,7 +96,10 @@ module Gitlab
end
def get_username
- username_claims.map { |claim| get_from_auth_hash_or_info(claim) }.find { |name| name.presence }
+ username_claims.map { |claim| get_from_auth_hash_or_info(claim) }
+ .find { |name| name.presence }
+ &.split("@")
+ &.first
end
def username_and_email