mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: suspended users are logged out when they are suspended. Show a reason for suspension when they try to log in.
This commit is contained in:
@ -53,6 +53,7 @@ class Admin::UsersController < Admin::AdminController
|
||||
@user.suspended_at = DateTime.now
|
||||
@user.save!
|
||||
StaffActionLogger.new(current_user).log_user_suspend(@user, params[:reason])
|
||||
MessageBus.publish "/logout", @user.id, user_ids: [@user.id]
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user