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:
parent
a8dbba9a01
commit
d95728dd16
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue