mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05: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
1 changed files with 12 additions and 9 deletions
|
@ -46,15 +46,18 @@ class Auth::Result
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
{
|
result = { email: email,
|
||||||
email: email,
|
username: UserNameSuggester.suggest(username || name || email),
|
||||||
name: User.suggest_name(name || username || email),
|
# this feels a tad wrong
|
||||||
username: UserNameSuggester.suggest(username || name || email),
|
auth_provider: authenticator_name.capitalize,
|
||||||
# this feels a tad wrong
|
email_valid: !!email_valid,
|
||||||
auth_provider: authenticator_name.capitalize,
|
omit_username: !!omit_username }
|
||||||
email_valid: !!email_valid,
|
|
||||||
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 a new issue