Merge "Change typehint callback to callable"
[lhc/web/wiklou.git] / includes / auth / AuthManager.php
index ab7ba0f..aae5a83 100644 (file)
@@ -681,8 +681,9 @@ class AuthManager implements LoggerAwareInterface {
                        // Step 4: Authentication complete! Set the user in the session and
                        // clean up.
 
-                       $this->logger->info( 'Login for {user} succeeded', [
+                       $this->logger->info( 'Login for {user} succeeded from {clientip}', [
                                'user' => $user->getName(),
+                               'clientip' => $this->request->getIP(),
                        ] );
                        /** @var RememberMeAuthenticationRequest $req */
                        $req = AuthenticationRequest::getRequestByClass(
@@ -1223,7 +1224,7 @@ class AuthManager implements LoggerAwareInterface {
                                        return $ret;
                                }
                        } else {
-                               if ( $user->getId() == 0 ) {
+                               if ( $user->getId() === 0 ) {
                                        $this->logger->debug( __METHOD__ . ': User does not exist locally when it should', [
                                                'user' => $user->getName(),
                                                'creator' => $creator->getName(),