keep working even if username is blank

This commit is contained in:
Sam 2015-05-07 13:52:26 +10:00
parent 4191d97d48
commit b7897d24b1
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class DiscourseSingleSignOn < SingleSignOn
end
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
if SiteSetting.sso_overrides_avatar && avatar_url.present? && (