Add a way to add email to block list when nuking a user

This commit is contained in:
Neil Lalonde
2013-07-25 15:30:03 -04:00
parent 5f8a130277
commit 8cee3a9fcd
4 changed files with 70 additions and 12 deletions

View File

@ -23,6 +23,10 @@ class UserDestroyer
end
user.destroy.tap do |u|
if u
if opts[:block_email]
b = BlockedEmail.block(u.email)
b.record_match! if b
end
Post.with_deleted.where(user_id: user.id).update_all("nuked_user = true")
StaffActionLogger.new(@admin).log_user_deletion(user)
DiscourseHub.unregister_nickname(user.username) if SiteSetting.call_discourse_hub?