Use bypass_sign_in method instead of bypass option in app/controllers/spree/users_controller.rb

This commit is contained in:
Nihal Mohammed
2022-03-14 19:49:20 +05:30
parent 8ceeaaa7d4
commit b3771bb623

View File

@@ -62,8 +62,7 @@ module Spree
if params[:user][:password].present?
# this logic needed b/c devise wants to log us out after password changes
Spree::User.reset_password_by_token(params[:user])
sign_in(@user, event: :authentication,
bypass: true)
bypass_sign_in(@user)
end
redirect_to spree.account_url, notice: Spree.t(:account_updated)
else