Oops, stay signed in when changing password
This commit is contained in:
parent
ae2b62956a
commit
0f5bb2a861
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,10 @@ class AuthUsersController < ApplicationController
|
||||||
@auth_user = load_auth_user
|
@auth_user = load_auth_user
|
||||||
|
|
||||||
if @auth_user.update_with_password(auth_user_params)
|
if @auth_user.update_with_password(auth_user_params)
|
||||||
|
# NOTE: Changing the password will sign you out, so make sure we stay
|
||||||
|
# signed in!
|
||||||
|
bypass_sign_in @auth_user, scope: :auth_user
|
||||||
|
|
||||||
flash[:notice] = "Settings successfully saved."
|
flash[:notice] = "Settings successfully saved."
|
||||||
redirect_to action: :edit
|
redirect_to action: :edit
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue