mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Add a way to add email to block list when nuking a user
This commit is contained in:
parent
5f8a130277
commit
8cee3a9fcd
4 changed files with 70 additions and 12 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue