summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 446b726..ec52cff 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -47,8 +47,7 @@ class UsersController < ApplicationController
end
def deactivate
- @user.enabled = false
- @user.save
+ @user.account.disable
flash[:notice] = I18n.t("actions.user_disabled_message", username: @user.username)
redirect_to :back
end