From e52e5da88cb0207727e6d080da76ab3575532ae0 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer <contact@jacobvosmaer.nl> Date: Wed, 21 May 2014 14:21:25 +0200 Subject: [PATCH] Downcase the LDAP email address before comparing --- lib/gitlab/ldap/access.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/ldap/access.rb b/lib/gitlab/ldap/access.rb index 9ea376ecac3..46fee724462 100644 --- a/lib/gitlab/ldap/access.rb +++ b/lib/gitlab/ldap/access.rb @@ -59,7 +59,7 @@ module Gitlab gitlab_user = ::User.where(provider: 'ldap', extern_uid: uid).last if gitlab_user && ldap_user && ldap_user.email - ldap_email = ldap_user.email.last + ldap_email = ldap_user.email.last.to_s.downcase if (gitlab_user.email != ldap_email) gitlab_user.update(email: ldap_email) -- 2.30.9