Commit b9b65b8d4e15bc7eec521b27f385ed62fb08d23f

Authored by Pat Thoyts
1 parent fa8219e0

Ensure LDAP provided email is always compared case-insensitively.

LDAP databases may store email addresses in mixed case so
ensure we only work with a lower case version to avoid missing
a valid account after LDAP login.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/user.rb
... ... @@ -73,7 +73,7 @@ class User &lt; ActiveRecord::Base
73 73  
74 74 def self.find_for_ldap_auth(omniauth_info)
75 75 name = omniauth_info.name
76   - email = omniauth_info.email
  76 + email = omniauth_info.email.downcase
77 77  
78 78 if @user = User.find_by_email(email)
79 79 @user
... ...