本文整理汇总了PHP中CUser::checkAuthentication方法的典型用法代码示例。如果您正苦于以下问题:PHP CUser::checkAuthentication方法的具体用法?PHP CUser::checkAuthentication怎么用?PHP CUser::checkAuthentication使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUser
的用法示例。
在下文中一共展示了CUser::checkAuthentication方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: check_authorisation
function check_authorisation()
{
global $USER_DETAILS;
$sessionid = get_cookie('zbx_sessionid');
$user = array('sessionid' => $sessionid);
if (!($auth = CUser::checkAuthentication($user))) {
include_once 'include/locales/en_gb.inc.php';
process_locales();
include 'index.php';
exit;
}
return $auth;
}
示例2: dirname
<?php
require_once dirname(__FILE__) . '/include/config.inc.php';
$page['title'] = _('Configuration of proxies');
$page['file'] = 'proxies.php';
$page['hist_arg'] = array('');
require_once dirname(__FILE__) . '/include/perm.inc.php';
if (isset($_COOKIE['zbx_sessionid'])) {
$cUser = new CUser();
$date = $cUser->checkAuthentication($_COOKIE['zbx_sessionid']);
if ($date['alias'] == 'guest') {
header("Location:/zabbix/");
} else {
require_once dirname(__FILE__) . '/zatree/zabbix.php';
}
} else {
header("Location:/zabbix/");
}