Clean up unused $displayPassword return value
authorSam Wilson <sam@samwilson.id.au>
Mon, 13 Apr 2020 02:32:17 +0000 (10:32 +0800)
committerReedy <reedy@wikimedia.org>
Mon, 20 Apr 2020 18:50:30 +0000 (19:50 +0100)
This is a follow-up to f12a3edff708a1fb73a09d154693dba49b69d921
to remove the now unused $password return variable.

Change-Id: I2b12bd7c9f84e915f1bda659a95bab3d63a611d2

includes/user/PasswordReset.php

index 2958b1f..25543a6 100644 (file)
@@ -154,8 +154,7 @@ class PasswordReset implements LoggerAwareInterface {
         * @param User $performingUser The user that does the password reset
         * @param string|null $username The user whose password is reset
         * @param string|null $email Alternative way to specify the user
-        * @return StatusValue Will contain the passwords as a username => password array if the
-        *   $displayPassword flag was set
+        * @return StatusValue
         * @throws LogicException When the user is not allowed to perform the action
         * @throws MWException On unexpected DB errors
         */
@@ -289,7 +288,6 @@ class PasswordReset implements LoggerAwareInterface {
                        return $result;
                }
 
-               $passwords = [];
                foreach ( $reqs as $req ) {
                        // This is adding a new temporary password, not intentionally changing anything
                        // (even though it might technically invalidate an old temporary password).
@@ -301,7 +299,7 @@ class PasswordReset implements LoggerAwareInterface {
                        $logContext
                );
 
-               return StatusValue::newGood( $passwords );
+               return StatusValue::newGood();
        }
 
        /**