diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 7aac01235..302eac5e7 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -387,7 +387,7 @@ class User < Principal if login.present? login = login.to_s # First look for an exact match - user = where(:login => login).all.detect {|u| u.login == login} + user = where(:login => login).detect {|u| u.login == login} unless user # Fail over to case-insensitive if none was found user = where("LOWER(login) = ?", login.downcase).first |