@@ -387,7 +387,7 class User < Principal | |||
|
387 | 387 | if login.present? |
|
388 | 388 | login = login.to_s |
|
389 | 389 | # First look for an exact match |
|
390 |
user = where(:login => login) |
|
|
390 | user = where(:login => login).detect {|u| u.login == login} | |
|
391 | 391 | unless user |
|
392 | 392 | # Fail over to case-insensitive if none was found |
|
393 | 393 | user = where("LOWER(login) = ?", login.downcase).first |
General Comments 0
You need to be logged in to leave comments.
Login now