Use identical check instead of equality check

$user->getId() returns an int and it's strict on this,
so the check here should be an identical check as "=="
does unnecessary coercion. So "===" will be faster and
improves on speed/performance.

Change-Id: I28a4e86ab339f10251df8846b8d951b673fe4f9e
This commit is contained in:
Alangi Derick 2018-10-31 13:22:58 +01:00
parent c16704c33a
commit e907d4328d

View file

@ -1224,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(),