summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin/users_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 770fe00af51..6092c79c254 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -55,6 +55,14 @@ class Admin::UsersController < Admin::ApplicationController
end
end
+ def confirm
+ if user.confirm!
+ redirect_to :back, notice: "Successfully confirmed"
+ else
+ redirect_to :back, alert: "Error occurred. User was not confirmed"
+ end
+ end
+
def disable_two_factor
user.disable_two_factor!
redirect_to admin_user_path(user),