From: Tyler Romeo Date: Mon, 4 Aug 2014 15:10:01 +0000 (-0400) Subject: Add loadPasswords() calls to User password mutators X-Git-Tag: 1.31.0-rc.0~14586^2 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=a223f2541b6874c82c204b5f07d26fe8d6bea31d;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 = '';