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>
This commit is contained in:
Pat Thoyts 2012-02-24 14:35:44 +00:00
parent fa8219e0a7
commit b9b65b8d4e

View file

@ -73,7 +73,7 @@ class User < ActiveRecord::Base
def self.find_for_ldap_auth(omniauth_info)
name = omniauth_info.name
email = omniauth_info.email
email = omniauth_info.email.downcase
if @user = User.find_by_email(email)
@user