Fix local account search on LDAP login being case-sensitive (#30113)
Co-authored-by: Claire <claire.github-309c@sitedethib.com>shrike
parent
d5444a2c6c
commit
9aa31be8d3
|
@ -22,7 +22,7 @@ module User::LdapAuthenticable
|
||||||
safe_username = safe_username.gsub(keys, replacement)
|
safe_username = safe_username.gsub(keys, replacement)
|
||||||
end
|
end
|
||||||
|
|
||||||
resource = joins(:account).find_by(accounts: { username: safe_username })
|
resource = joins(:account).merge(Account.where(Account.arel_table[:username].lower.eq safe_username.downcase)).take
|
||||||
|
|
||||||
if resource.blank?
|
if resource.blank?
|
||||||
resource = new(
|
resource = new(
|
||||||
|
|
Loading…
Reference in New Issue