mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't include name
in hash when names are disabled.
This could break some SSO implementations due to honeypot not being triggered.
This commit is contained in:
parent
b9437936ab
commit
0b4c9005f9
@ -46,15 +46,18 @@ class Auth::Result
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
{
|
result = { email: email,
|
||||||
email: email,
|
|
||||||
name: User.suggest_name(name || username || email),
|
|
||||||
username: UserNameSuggester.suggest(username || name || email),
|
username: UserNameSuggester.suggest(username || name || email),
|
||||||
# this feels a tad wrong
|
# this feels a tad wrong
|
||||||
auth_provider: authenticator_name.capitalize,
|
auth_provider: authenticator_name.capitalize,
|
||||||
email_valid: !!email_valid,
|
email_valid: !!email_valid,
|
||||||
omit_username: !!omit_username
|
omit_username: !!omit_username }
|
||||||
}
|
|
||||||
|
if SiteSetting.enable_names?
|
||||||
|
result[:name] = User.suggest_name(name || username || email)
|
||||||
|
end
|
||||||
|
|
||||||
|
result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user