Maintain remember me state on password change
Fix regression from https://gerrit.wikimedia.org/r/#/c/94614/ Ensure that when users login with "remember me" selected, they get a new remember me token after changing their password. Change-Id: Ibbf0d823bd5ef5304bf6ad1b67966d18dfb3580c
This commit is contained in:
parent
3ec32e3e5f
commit
1f7038363f
1 changed files with 2 additions and 1 deletions
|
|
@ -296,7 +296,8 @@ class SpecialChangePassword extends FormSpecialPage {
|
|||
if ( $isSelf ) {
|
||||
// This is needed to keep the user connected since
|
||||
// changing the password also modifies the user's token.
|
||||
$user->setCookies();
|
||||
$remember = $this->getRequest()->getCookie( 'Token' ) !== null;
|
||||
$user->setCookies( null, null, $remember );
|
||||
}
|
||||
$user->resetPasswordExpiration();
|
||||
$user->saveSettings();
|
||||
|
|
|
|||
Loading…
Reference in a new issue