/** * * Sets the user timeout status, and logs out if expired. * * @param Auth $auth An authentication tracker. * * @return bool * */ protected function timedOut(Auth $auth) { if ($auth->isAnon()) { return false; } $timeout_status = $this->timer->getTimeoutStatus($auth->getFirstActive(), $auth->getLastActive()); if ($timeout_status) { $auth->setStatus($timeout_status); $this->logout_service->logout($auth, $timeout_status); return true; } return false; }
/** * @return bool */ public function isAnon() { $this->resume(); return $this->authenticationSession->isAnon(); }