mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-02 11:59:17 -05:00
only the host part of an email address is case insensitive
This commit is contained in:
parent
8fa9c51bf4
commit
5ca187ba57
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ class User < ActiveRecord::Base
|
||||||
|
|
||||||
def self.avatar_template(email)
|
def self.avatar_template(email)
|
||||||
user = User.select([:email, :use_uploaded_avatar, :uploaded_avatar_template, :uploaded_avatar_id])
|
user = User.select([:email, :use_uploaded_avatar, :uploaded_avatar_template, :uploaded_avatar_id])
|
||||||
.where(['lower(email) = lower(?)', email])
|
.where(email: Email.downcase(email))
|
||||||
.first
|
.first
|
||||||
user.avatar_template if user.present?
|
user.avatar_template if user.present?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue