Follow up to I2c736ad to fix use of undefined `$id` variable.
Change-Id: I04bd9c1dd7e3e1e63b8008d02df91cfb1ad971a3
* @param bool $throttle If true, reset the throttle timestamp to the present
*/
public function setNewpassword( $str, $throttle = true ) {
+ $id = $this->getId();
+ if ( $id == 0 ) {
+ throw new LogicException( 'Cannot set new password for a user that is not in the database.' );
+ }
+
$dbw = wfGetDB( DB_MASTER );
$passwordFactory = new PasswordFactory();