Merge "Rewrite pref cleanup script"
[lhc/web/wiklou.git] / includes / auth / AuthManager.php
index 818f778..af070c2 100644 (file)
@@ -1551,7 +1551,10 @@ class AuthManager implements LoggerAwareInterface {
                // Fetch the user ID from the master, so that we don't try to create the user
                // when they already exist, due to replication lag
                // @codeCoverageIgnoreStart
-               if ( !$localId && wfGetLB()->getReaderIndex() != 0 ) {
+               if (
+                       !$localId &&
+                       MediaWikiServices::getInstance()->getDBLoadBalancer()->getReaderIndex() != 0
+               ) {
                        $localId = User::idFromName( $username, User::READ_LATEST );
                        $flags = User::READ_LATEST;
                }
@@ -2131,7 +2134,7 @@ class AuthManager implements LoggerAwareInterface {
         * @param AuthenticationRequest[] &$reqs
         * @param string $action
         * @param string|null $username
-        * @param boolean $forceAction
+        * @param bool $forceAction
         */
        private function fillRequests( array &$reqs, $action, $username, $forceAction = false ) {
                foreach ( $reqs as $req ) {