Add a message to the staff logs indicating why a user was purged

This commit is contained in:
Robin Ward 2014-08-27 16:04:46 -04:00
parent 940c0d5dbb
commit 0ae3c327de
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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}."