summaryrefslogtreecommitdiff
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-02-10 10:56:57 -0800
committerelijah <elijah@riseup.net>2016-02-10 10:56:57 -0800
commit49d3e9df74685fe17a2abbbabdd17014f2371065 (patch)
tree41dc44c41659e2f970b84ac2fe0da8152422efee /app/controllers/users_controller.rb
parent0ba489bdb01bb2f0536d2603bd389d448712e336 (diff)
allow user accounts to be re-enabled, and for associated identities to also get re-enabled.
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 ec52cff..1404b0e 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -53,8 +53,7 @@ class UsersController < ApplicationController
end
def enable
- @user.enabled = true
- @user.save
+ @user.account.enable
flash[:notice] = I18n.t("actions.user_enabled_message", username: @user.username)
redirect_to :back
end