From 58fb47b1e23efc7ee35b31b9a06f32aff2a19706 Mon Sep 17 00:00:00 2001 From: Reedy Date: Fri, 13 Sep 2019 19:03:20 +0100 Subject: [PATCH] Remove User::setNewpassword() Change-Id: I0a52ac16bc9c62bf344af3f489f4cbe7576fc733 --- RELEASE-NOTES-1.34 | 1 + includes/user/User.php | 16 ++-------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/RELEASE-NOTES-1.34 b/RELEASE-NOTES-1.34 index 07f52d0c1b..d2dbce11fc 100644 --- a/RELEASE-NOTES-1.34 +++ b/RELEASE-NOTES-1.34 @@ -429,6 +429,7 @@ because of Phabricator reports. * 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. diff --git a/includes/user/User.php b/includes/user/User.php index d71750bcfd..f5e3c69a3b 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -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 @@ -4320,13 +4308,13 @@ class User implements IDBAccessObject, UserIdentity { '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... - \MediaWiki\Logger\LoggerFactory::getInstance( 'authentication' ) + LoggerFactory::getInstance( 'authentication' ) ->info( __METHOD__ . ': Authentication failed: ' . $res->message->plain() ); return false; default: -- 2.20.1