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:
Neil Lalonde
2015-01-19 12:36:56 -05:00
parent ed714794fc
commit 7412ff4da7
3 changed files with 21 additions and 6 deletions

View File

@ -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