mirror of
https://github.com/discourse/discourse.git
synced 2025-05-11 20:53:43 +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
|
topic_user.destroy
|
||||||
# we can not remove ourselves cause then we will end up adding
|
# we can not remove ourselves cause then we will end up adding
|
||||||
# ourselves in add_small_action
|
# 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)
|
add_small_action(removed_by, "removed_user", user.username)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user