Merge "Remove deprecated wgEnableParserCache"
[lhc/web/wiklou.git] / includes / auth / TemporaryPasswordPrimaryAuthenticationProvider.php
index 44c2824..045f791 100644 (file)
@@ -146,7 +146,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider
                }
 
                $pwhash = $this->getPassword( $row->user_newpassword );
-               if ( !$pwhash->equals( $req->password ) ) {
+               if ( !$pwhash->verify( $req->password ) ) {
                        return $this->failResponse( $req );
                }
 
@@ -314,7 +314,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider
 
                if ( $sendMail ) {
                        // Send email after DB commit
-                       $dbw->onTransactionIdle(
+                       $dbw->onTransactionCommitOrIdle(
                                function () use ( $req ) {
                                        /** @var TemporaryPasswordAuthenticationRequest $req */
                                        $this->sendPasswordResetEmail( $req );
@@ -360,7 +360,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider
                        if ( $req->username !== null && $req->password !== null ) {
                                // Nothing we can do yet, because the user isn't in the DB yet
                                if ( $req->username !== $user->getName() ) {
-                                       $req = clone( $req );
+                                       $req = clone $req;
                                        $req->username = $user->getName();
                                }
 
@@ -388,7 +388,7 @@ class TemporaryPasswordPrimaryAuthenticationProvider
 
                if ( $mailpassword ) {
                        // Send email after DB commit
-                       wfGetDB( DB_MASTER )->onTransactionIdle(
+                       wfGetDB( DB_MASTER )->onTransactionCommitOrIdle(
                                function () use ( $user, $creator, $req ) {
                                        $this->sendNewAccountEmail( $user, $creator, $req->password );
                                },