Downcase the LDAP email address before comparing

This commit is contained in:
Jacob Vosmaer
2014-05-21 14:21:25 +02:00
parent 4ce8287e02
commit e52e5da88c
+1 -1
View File
@@ -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)