本文整理匯總了PHP中UserAccess::isSupport方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserAccess::isSupport方法的具體用法?PHP UserAccess::isSupport怎麽用?PHP UserAccess::isSupport使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserAccess
的用法示例。
在下文中一共展示了UserAccess::isSupport方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: before
public function before()
{
$userAccess = new UserAccess();
if (!$userAccess->isSupport()) {
if ($this->request->isAjax()) {
die('{ "ok" : false, "msg" : "Access denied" }');
} else {
Header::redirect(URL::baseUrl() . '/login');
}
}
try {
$pkSupportUserAccess = array('id_support_user' => $_SESSION['support_user']['id_user']);
$supportUserAccess = $this->orm->support_user_access[$pkSupportUserAccess];
if (!$supportUserAccess['maintain_user']) {
$view = View::instance();
$view->message = 'Access denied';
$view->render('error');
die;
}
} catch (Exception $e) {
$view = View::instance();
$view->message = 'Error occurred';
$view->render('error');
die;
}
}
示例2: get_index
public function get_index()
{
$userAccess = new UserAccess();
if ($userAccess->isSupport()) {
Header::redirect(URL::baseUrl() . '/support');
}
$view = View::instance();
$view->email = @$this->request->cookie('email');
$view->render('login');
}
示例3: before
public function before()
{
$userAccess = new UserAccess();
if (!$userAccess->isSupport()) {
if ($this->request->isAjax()) {
die('{ "ok" : false, "msg" : "Access denied" }');
} else {
Header::redirect(URL::baseUrl() . '/login');
}
}
}