Add a message to the staff logs indicating why a user was purged
This commit is contained in:
parent
940c0d5dbb
commit
0ae3c327de
|
@ -737,7 +737,7 @@ class User < ActiveRecord::Base
|
|||
destroyer = UserDestroyer.new(Discourse.system_user)
|
||||
to_destroy.each do |u|
|
||||
begin
|
||||
destroyer.destroy(u)
|
||||
destroyer.destroy(u, context: I18n.t(:purge_reason))
|
||||
rescue Discourse::InvalidAccess
|
||||
# if for some reason the user can't be deleted, continue on to the next one
|
||||
end
|
||||
|
|
|
@ -35,6 +35,8 @@ en:
|
|||
via: "%{username} via %{site_name}"
|
||||
is_reserved: "is reserved"
|
||||
|
||||
purge_reason: "Automatically deleted due to being old and unverified"
|
||||
|
||||
errors:
|
||||
messages:
|
||||
too_long_validation: "is limited to %{max} characters; you entered %{length}."
|
||||
|
|
Loading…
Reference in New Issue