Commit e52e5da8 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Downcase the LDAP email address before comparing

parent 4ce8287e
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment