diff options
author | Stan Hu <stanhu@gmail.com> | 2017-04-16 14:54:41 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-04-17 17:17:31 -0700 |
commit | fd605619361ce60500c58e5dffbbe8446cc25396 (patch) | |
tree | a59367e58c6de833878dbe7f267b0cd9945cc5a6 /app/models | |
parent | dbcfbd68b6b2b4c62ba5381317296b23002e3067 (diff) | |
download | gitlab-ce-fd605619361ce60500c58e5dffbbe8446cc25396.tar.gz |
Use DeleteUserWorker for removing users via spam logssh-use-delete-worker-spam-logs
Before deleting a user via a SpamLog would just call `user.destroy`,
which may omit other things that need to be cleaned up.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/spam_log.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/spam_log.rb b/app/models/spam_log.rb index 3b8b9833565..dd21ee15c6c 100644 --- a/app/models/spam_log.rb +++ b/app/models/spam_log.rb @@ -3,9 +3,9 @@ class SpamLog < ActiveRecord::Base validates :user, presence: true - def remove_user + def remove_user(deleted_by:) user.block - user.destroy + DeleteUserWorker.perform_async(deleted_by.id, user.id, delete_solo_owned_groups: true, hard_delete: true) end def text |