mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 16:42:46 +08:00
FIX: downcase SSO external email before checking against Discourse email (#8306)
* Downcase single_sign_on_record.external_email before checking against Discourse email * Use &.downcase
This commit is contained in:
parent
54fe887c44
commit
b3e8fbe7d4
|
@ -908,7 +908,7 @@ class User < ActiveRecord::Base
|
|||
def email_confirmed?
|
||||
email_tokens.where(email: email, confirmed: true).present? ||
|
||||
email_tokens.empty? ||
|
||||
single_sign_on_record&.external_email == email
|
||||
single_sign_on_record&.external_email&.downcase == email
|
||||
end
|
||||
|
||||
def activate
|
||||
|
|
Loading…
Reference in New Issue
Block a user