FIX: find_by_attribute method in Rails 4.5 is case insensitive.

* https://github.com/rails/rails/pull/23690
This commit is contained in:
Guo Xiang Tan 2016-02-15 23:05:16 +08:00
parent 40b099f1a6
commit 2af587005b
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ class DiscourseSingleSignOn < SingleSignOn
private
def match_email_or_create_user(ip_address)
user = User.find_by_email(email)
user = User.find_by(email: email)
try_name = name.blank? ? nil : name
try_username = username.blank? ? nil : username