mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add Suspend User to flags page
This commit is contained in:
@@ -169,9 +169,13 @@ class StaffActionLogger
|
||||
|
||||
def log_user_suspend(user, reason, opts = {})
|
||||
raise Discourse::InvalidParameters.new(:user) unless user
|
||||
UserHistory.create(params(opts).merge(action: UserHistory.actions[:suspend_user],
|
||||
target_user_id: user.id,
|
||||
details: reason))
|
||||
args = params(opts).merge(
|
||||
action: UserHistory.actions[:suspend_user],
|
||||
target_user_id: user.id,
|
||||
details: reason
|
||||
)
|
||||
args[:post_id] = opts[:post_id] if opts[:post_id]
|
||||
UserHistory.create(args)
|
||||
end
|
||||
|
||||
def log_user_unsuspend(user, opts = {})
|
||||
|
||||
Reference in New Issue
Block a user