Skip to content

Commit

Permalink
LDAP: Ignore case when searching for account by username
Browse files Browse the repository at this point in the history
  • Loading branch information
raucao committed Apr 27, 2024
1 parent 65093c6 commit 450fa55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/user/ldap_authenticable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def ldap_get_user(attributes = {})
safe_username = safe_username.gsub(keys, replacement)
end

resource = joins(:account).find_by(accounts: { username: safe_username })
resource = joins(:account).find_by('accounts.username ILIKE ?', safe_username)

if resource.blank?
resource = new(
Expand Down

0 comments on commit 450fa55

Please sign in to comment.