mirror of
https://github.com/discourse/discourse.git
synced 2026-08-12 05:55:39 -05:00
Fixed anonymizer when 'full name required' setting is on
When the setting 'full name required' is on the anonymizer was trying to set the user name to nil and this caused the user name and email to remain not anonymized. Now in this scenario the user name is set to the anonimized username and the email is anonymized correctly.
This commit is contained in:
@@ -20,7 +20,7 @@ class UserAnonymizer
|
||||
@user.reload
|
||||
@user.password = SecureRandom.hex
|
||||
@user.email = "#{@user.username}@example.com"
|
||||
@user.name = nil
|
||||
@user.name = SiteSetting.full_name_required ? @user.username : nil
|
||||
@user.date_of_birth = nil
|
||||
@user.title = nil
|
||||
@user.uploaded_avatar_id = nil
|
||||
|
||||
Reference in New Issue
Block a user