mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: extract and fix overriding of usernames by external auth (#14637)
This commit is contained in:
committed by
GitHub
parent
ceca34aca6
commit
1c0022c195
@@ -77,9 +77,8 @@ class Auth::Result
|
||||
|
||||
def apply_user_attributes!
|
||||
change_made = false
|
||||
if SiteSetting.auth_overrides_username? && username.present? && UserNameSuggester.fix_username(username) != user.username
|
||||
user.username = UserNameSuggester.suggest(username)
|
||||
change_made = true
|
||||
if SiteSetting.auth_overrides_username? && username.present?
|
||||
change_made = UsernameChanger.override(user, username)
|
||||
end
|
||||
|
||||
if SiteSetting.auth_overrides_email && email_valid && email.present? && user.email != Email.downcase(email)
|
||||
|
||||
Reference in New Issue
Block a user