From 55c1a53cef1018e398267570c1c9db89c97cf0dd Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Tue, 15 Nov 2016 03:44:49 +0000 Subject: [PATCH] Use different varname for upgraded hash from original hash I found this confusing when reading the code. This should have identical logic but slightly clearer. Change-Id: I4918c29bd5dca3642de7bb60219fc246299d952d --- .../auth/LocalPasswordPrimaryAuthenticationProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/auth/LocalPasswordPrimaryAuthenticationProvider.php b/includes/auth/LocalPasswordPrimaryAuthenticationProvider.php index 88df68d310..24124a92d2 100644 --- a/includes/auth/LocalPasswordPrimaryAuthenticationProvider.php +++ b/includes/auth/LocalPasswordPrimaryAuthenticationProvider.php @@ -132,12 +132,12 @@ class LocalPasswordPrimaryAuthenticationProvider // @codeCoverageIgnoreStart if ( $this->getPasswordFactory()->needsUpdate( $pwhash ) ) { - $pwhash = $this->getPasswordFactory()->newFromPlaintext( $req->password ); - \DeferredUpdates::addCallableUpdate( function () use ( $pwhash, $oldRow ) { + $newHash = $this->getPasswordFactory()->newFromPlaintext( $req->password ); + \DeferredUpdates::addCallableUpdate( function () use ( $newHash, $oldRow ) { $dbw = wfGetDB( DB_MASTER ); $dbw->update( 'user', - [ 'user_password' => $pwhash->toString() ], + [ 'user_password' => $newHash->toString() ], [ 'user_id' => $oldRow->user_id, 'user_password' => $oldRow->user_password -- 2.20.1