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:
parent
fa8219e0a7
commit
b9b65b8d4e
|
@ -73,7 +73,7 @@ class User < ActiveRecord::Base
|
||||||
|
|
||||||
def self.find_for_ldap_auth(omniauth_info)
|
def self.find_for_ldap_auth(omniauth_info)
|
||||||
name = omniauth_info.name
|
name = omniauth_info.name
|
||||||
email = omniauth_info.email
|
email = omniauth_info.email.downcase
|
||||||
|
|
||||||
if @user = User.find_by_email(email)
|
if @user = User.find_by_email(email)
|
||||||
@user
|
@user
|
||||||
|
|
Loading…
Reference in a new issue