From a223f2541b6874c82c204b5f07d26fe8d6bea31d Mon Sep 17 00:00:00 2001 From: Tyler Romeo Date: Mon, 4 Aug 2014 11:10:01 -0400 Subject: [PATCH] Add loadPasswords() calls to User password mutators In User::setPassword() and User::setNewpassword(), added calls to loadPasswords() so that the passwords are not overridden when they are eventually actually loaded. Bug: 69102 Change-Id: I0b881986323051abed7d1af816eae9eafdbd6782 --- includes/User.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/User.php b/includes/User.php index 7edd93ec78..fe4118782b 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2294,6 +2294,8 @@ class User implements IDBAccessObject { public function setPassword( $str ) { global $wgAuth; + $this->loadPasswords(); + if ( $str !== null ) { if ( !$wgAuth->allowPasswordChange() ) { throw new PasswordError( wfMessage( 'password-change-forbidden' )->text() ); @@ -2380,7 +2382,7 @@ class User implements IDBAccessObject { * @param bool $throttle If true, reset the throttle timestamp to the present */ public function setNewpassword( $str, $throttle = true ) { - $this->load(); + $this->loadPasswords(); if ( $str === null ) { $this->mNewpassword = ''; -- 2.20.1