Remove User::setNewpassword()
authorReedy <reedy@wikimedia.org>
Fri, 13 Sep 2019 18:03:20 +0000 (19:03 +0100)
committerReedy <reedy@wikimedia.org>
Fri, 13 Sep 2019 18:03:20 +0000 (19:03 +0100)
Change-Id: I0a52ac16bc9c62bf344af3f489f4cbe7576fc733

RELEASE-NOTES-1.34
includes/user/User.php

index 07f52d0..d2dbce1 100644 (file)
@@ -429,6 +429,7 @@ because of Phabricator reports.
   * Revision::selectTextFields()
   * Revision::selectPageFields()
   * Revision::selectUserFields()
   * Revision::selectTextFields()
   * Revision::selectPageFields()
   * Revision::selectUserFields()
+* User::setNewpassword(), deprecated in 1.27 has been removed.
 
 === Deprecations in 1.34 ===
 * The MWNamespace class is deprecated. Use NamespaceInfo.
 
 === Deprecations in 1.34 ===
 * The MWNamespace class is deprecated. Use NamespaceInfo.
index d71750b..f5e3c69 100644 (file)
@@ -2794,18 +2794,6 @@ class User implements IDBAccessObject, UserIdentity {
                }
        }
 
                }
        }
 
-       /**
-        * Set the password for a password reminder or new account email
-        *
-        * @deprecated Removed in 1.27. Use PasswordReset instead.
-        * @param string $str New password to set or null to set an invalid
-        *  password hash meaning that the user will not be able to use it
-        * @param bool $throttle If true, reset the throttle timestamp to the present
-        */
-       public function setNewpassword( $str, $throttle = true ) {
-               throw new BadMethodCallException( __METHOD__ . ' has been removed in 1.27' );
-       }
-
        /**
         * Get the user's e-mail address
         * @return string User's email address
        /**
         * Get the user's e-mail address
         * @return string User's email address
@@ -4320,13 +4308,13 @@ class User implements IDBAccessObject, UserIdentity {
                                'password' => $password,
                        ]
                );
                                'password' => $password,
                        ]
                );
-               $res = AuthManager::singleton()->beginAuthentication( $reqs, 'null:' );
+               $res = $manager->beginAuthentication( $reqs, 'null:' );
                switch ( $res->status ) {
                        case AuthenticationResponse::PASS:
                                return true;
                        case AuthenticationResponse::FAIL:
                                // Hope it's not a PreAuthenticationProvider that failed...
                switch ( $res->status ) {
                        case AuthenticationResponse::PASS:
                                return true;
                        case AuthenticationResponse::FAIL:
                                // Hope it's not a PreAuthenticationProvider that failed...
-                               \MediaWiki\Logger\LoggerFactory::getInstance( 'authentication' )
+                               LoggerFactory::getInstance( 'authentication' )
                                        ->info( __METHOD__ . ': Authentication failed: ' . $res->message->plain() );
                                return false;
                        default:
                                        ->info( __METHOD__ . ': Authentication failed: ' . $res->message->plain() );
                                return false;
                        default: