/** * Requires an authorized session. * * If the client does not hold an authorized session, this function * will redirect the client to the `login` page. * * This function will call Page::requireInstallationComplete prior to other * actions. */ public static final function requireLogin() { self::requireInstallationComplete(); if (!Authorization::loggedIn()) { self::redirectTo('login'); exit; } }
public function init($params) { if (Authorization::loggedIn()) { self::redirectTo('home'); exit; } $postData = \tniessen\tinyIt\HttpParams::_POST(); if ($postData && !$postData->isEmpty()) { $this->tryProcessPostData($postData); } }
public function init($params) { if (Authorization::loggedIn()) { self::redirectTo('home'); exit; } $dbc = Application::dbConnection(); if (!$dbc->options()->getOption('allow_registration')) { self::redirectTo('login'); exit; } $postData = \tniessen\tinyIt\HttpParams::_POST(); if ($postData && !$postData->isEmpty()) { $this->currentParams = $postData; $this->tryProcessPostData($postData); } }