mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:36:11 +08:00
FIX: Handle empty email address from authentication provider (#12046)
If no email is provided, email_valid should be set false, so that Discourse can prompt the user for an email and verify it. This fixes signups via twitter for accounts with no email address.
This commit is contained in:
@ -103,7 +103,7 @@ class Auth::ManagedAuthenticator < Auth::Authenticator
|
||||
result.name = nil
|
||||
end
|
||||
result.username = info[:nickname]
|
||||
result.email_valid = primary_email_verified?(auth_token) if result.email
|
||||
result.email_valid = primary_email_verified?(auth_token) if result.email.present?
|
||||
result.extra_data = {
|
||||
provider: auth_token[:provider],
|
||||
uid: auth_token[:uid]
|
||||
|
Reference in New Issue
Block a user