mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 05:32:44 +08:00
add a tiny bit of extra protection
This commit is contained in:
parent
4b449914b8
commit
4424fd81b8
|
@ -700,7 +700,7 @@ SQL
|
|||
topic_user.destroy
|
||||
# we can not remove ourselves cause then we will end up adding
|
||||
# ourselves in add_small_action
|
||||
removed_by = Discourse.system_user if user.id == removed_by.id
|
||||
removed_by = Discourse.system_user if user.id == removed_by&.id
|
||||
add_small_action(removed_by, "removed_user", user.username)
|
||||
return true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user