Merge "user: Use cached singleton instance variable"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 13 Sep 2019 21:17:49 +0000 (21:17 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 13 Sep 2019 21:17:49 +0000 (21:17 +0000)
includes/user/User.php

index d71750b..6b3e3b2 100644 (file)
@@ -4320,13 +4320,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: