/** * 必须登录检查,若未登录跳转至登录页 */ protected function mustLoginCheck() { if ($this->mustLogin) { if (!$this->isLogin()) { if (ComTool::isAjax()) { exit('not login'); } else { Cola_Response::redirect(ComTool::url("acc/super_login")); } } } }
/** * 必须登录检查,若未登录跳转至登录页 */ protected function mustLoginCheck() { if ($this->mustLogin) { if (!$this->isLogin()) { if (ComTool::isAjax()) { exit('not login'); } else { /* $token = trim ( $this->get ( 'token', '' ) ); */ Cola_Response::redirect(ComTool::url("acc/manage_login")); } } } }
/** * 必须登录检查,若未登录跳转至登录页 */ protected function mustLoginCheck() { if ($this->mustLogin) { if (!$this->isLogin()) { if (ComTool::isAjax()) { //ComTool::ajax ( Cola::getConfig ( '_error.mustlogin' ), '请先登录,即将跳转至登录页面' ); } else { $pathinfo = trim($_SERVER['PATH_INFO'], '/\\'); $returnUrl = urlencode(ComTool::urlRoot() . $pathinfo); Cola_Response::redirect(ComTool::url("acc/login?returnUrl={$returnUrl}")); } } } }