Clear profile cache on banish (#1702)
* save spam username as old username * keep old username for reference
This commit is contained in:
parent
32bf541ffd
commit
d36418a62a
1 changed files with 1 additions and 2 deletions
|
|
@ -22,9 +22,8 @@ module Moderator
|
|||
new_name = "spam_#{rand(10000)}"
|
||||
new_username = "spam_#{rand(10000)}"
|
||||
end
|
||||
user.update_columns(name: new_name, username: new_username)
|
||||
user.update_columns(name: new_name, username: new_username, old_username: user.name)
|
||||
CacheBuster.new.bust("/#{user.old_username}")
|
||||
user.update_columns(old_username: nil)
|
||||
end
|
||||
|
||||
def remove_profile_info
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue