diff --git a/modules/mfa/src/Auth/Process/Mfa.php b/modules/mfa/src/Auth/Process/Mfa.php index fc7fa60..2c73905 100644 --- a/modules/mfa/src/Auth/Process/Mfa.php +++ b/modules/mfa/src/Auth/Process/Mfa.php @@ -700,9 +700,11 @@ public static function isRememberMeCookieValid( if ((int)$expireDate > time()) { $expectedString = self::generateRememberMeCookieString($rememberSecret, $state['employeeId'], $expireDate, $mfaOptions); $isValid = password_verify($expectedString, $cookieHash); - - $idBrokerClient = self::getIdBrokerClient($state['idBrokerConfig']); - $idBrokerClient->updateUserLastLogin($state['employeeId']); + + if ($isValid) { + $idBrokerClient = self::getIdBrokerClient($state['idBrokerConfig']); + $idBrokerClient->updateUserLastLogin($state['employeeId']); + } return $isValid; }