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:
authorRobin Bobbitt <ryehle@us.ibm.com>2017-06-06 18:39:54 +0300
committerRobin Bobbitt <ryehle@us.ibm.com>2017-06-07 18:13:57 +0300
commit469acd190e497cda8516da0ee481f33e038d7e9e (patch)
tree7b2fd577757c49570fc353a02a23533a0674d8fa /app/helpers
parent8fdba5fac2a5fb4ce17a11580e94a85257e76e2c (diff)
Sync email address from specified omniauth provider
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/profiles_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/profiles_helper.rb b/app/helpers/profiles_helper.rb
new file mode 100644
index 00000000000..45238f12ac7
--- /dev/null
+++ b/app/helpers/profiles_helper.rb
@@ -0,0 +1,7 @@
+module ProfilesHelper
+ def email_provider_label
+ return unless current_user.external_email?
+
+ current_user.email_provider.present? ? Gitlab::OAuth::Provider.label_for(current_user.email_provider) : "LDAP"
+ end
+end