本文整理汇总了PHP中users::getuserinfo方法的典型用法代码示例。如果您正苦于以下问题:PHP users::getuserinfo方法的具体用法?PHP users::getuserinfo怎么用?PHP users::getuserinfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类users
的用法示例。
在下文中一共展示了users::getuserinfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admin_read
public function admin_read($ticket)
{
$users = new users();
if ($users->getuserinfo('user_group') == 1 && $this->ticket_info($ticket, 'user') != $_COOKIE['user']) {
$_link = $this->getDBH();
$query = $_link->prepare('UPDATE `tickets` SET `admin_read` = 1 WHERE `uniqid` = :uniqid');
$query->bindParam(':uniqid', $ticket, PDO::PARAM_STR);
$query->execute();
}
}
示例2: close_ticket
public function close_ticket($ticket)
{
$tickets = new tickets();
$users = new users();
$_link = $this->getDBH();
if ($tickets->is_ticket($ticket) && $users->getuserinfo('user_group') == 1) {
$query = $_link->prepare('UPDATE `tickets` SET `resolved` = 1 WHERE `uniqid` = :ticket');
$query->bindParam(':ticket', $ticket, PDO::PARAM_STR);
$query->execute();
echo 'success';
}
}