public function createAuthResult($code, $identity, array $messages = array(), $backendName = null) { $authResult = new AuthResult($code, $identity, $messages); if (isset($backendName)) { $authResult->addBackendName($backendName); } return $authResult; }
/** * @param \Cms\Access\Auth\Result|null $authResult * * @throws \Cms\Exception */ protected function checkIfSpaceIsExpired($authResult) { $quota = new \Cms\Quota(); if (!$quota->isSpaceExpired()) { return; } $exceptionData = array(); if ($authResult instanceof \Cms\Access\Auth\Result) { $identity = $authResult->getIdentity(); if (isset($identity['owner']) && $identity['owner'] == true) { $cfg = Registry::getConfig(); if (isset($cfg->owner) && isset($cfg->owner->dashboardUrl)) { $exceptionData['redirect'] = $cfg->owner->dashboardUrl; } } } throw new \Cms\Exception(9, __METHOD__, __LINE__, $exceptionData); }