about summary refs log tree commit diff
path: root/app/controllers/auth/confirmations_controller.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-06-22 00:10:43 +0200
committerGitHub <noreply@github.com>2018-06-22 00:10:43 +0200
commit03cfe366fd0146cb4c3ede4dcdeeb2228a513e7d (patch)
tree4ea4874b420a859b706b1187440e2ed103800396 /app/controllers/auth/confirmations_controller.rb
parentf0161702d857a2f91d2e51469e8480253ffcd86e (diff)
parent0c3a337e045dbd4b7be6ae6c3f07969b42f08857 (diff)
Merge pull request #550 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/auth/confirmations_controller.rb')
-rw-r--r--app/controllers/auth/confirmations_controller.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb
index f3e0ae257..de0fcd3e3 100644
--- a/app/controllers/auth/confirmations_controller.rb
+++ b/app/controllers/auth/confirmations_controller.rb
@@ -6,18 +6,12 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
   before_action :set_user, only: [:finish_signup]
   before_action :set_pack
 
-  private
-
-  def set_pack
-    use_pack 'auth'
-  end
-
   # GET/PATCH /users/:id/finish_signup
   def finish_signup
     return unless request.patch? && params[:user]
     if @user.update(user_params)
       @user.skip_reconfirmation!
-      sign_in(@user, bypass: true)
+      bypass_sign_in(@user)
       redirect_to root_path, notice: I18n.t('devise.confirmations.send_instructions')
     else
       @show_errors = true
@@ -26,6 +20,10 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
 
   private
 
+  def set_pack
+    use_pack 'auth'
+  end
+
   def set_user
     @user = current_user
   end