mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
keep working even if username is blank
This commit is contained in:
parent
4191d97d48
commit
b7897d24b1
|
@ -120,7 +120,7 @@ class DiscourseSingleSignOn < SingleSignOn
|
||||||
end
|
end
|
||||||
|
|
||||||
if SiteSetting.sso_overrides_name && user.name != name
|
if SiteSetting.sso_overrides_name && user.name != name
|
||||||
user.name = name || User.suggest_name(username || email)
|
user.name = name || User.suggest_name(username.blank? ? email : username)
|
||||||
end
|
end
|
||||||
|
|
||||||
if SiteSetting.sso_overrides_avatar && avatar_url.present? && (
|
if SiteSetting.sso_overrides_avatar && avatar_url.present? && (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user