mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FIX: New avatar regression with mixed case email addresses.
This commit is contained in:
parent
aec929b184
commit
8fa9c51bf4
1 changed files with 1 additions and 1 deletions
|
@ -299,7 +299,7 @@ class User < ActiveRecord::Base
|
|||
|
||||
def self.avatar_template(email)
|
||||
user = User.select([:email, :use_uploaded_avatar, :uploaded_avatar_template, :uploaded_avatar_id])
|
||||
.where(email: email.downcase)
|
||||
.where(['lower(email) = lower(?)', email])
|
||||
.first
|
||||
user.avatar_template if user.present?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue