本文整理汇总了PHP中KunenaFactory::getuser方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaFactory::getuser方法的具体用法?PHP KunenaFactory::getuser怎么用?PHP KunenaFactory::getuser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaFactory
的用法示例。
在下文中一共展示了KunenaFactory::getuser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _modTopicList
protected function _modTopicList($data)
{
$result = array();
$catid = intval($data);
$user = KunenaFactory::getuser();
if ($catid && $user->isModerator($catid)) {
$query = "SELECT id, subject\n\t\t\t\t\t\t\tFROM #__kunena_messages\n\t\t\t\t\t\t\tWHERE catid={$this->_db->Quote($catid)} AND parent=0 AND moved=0\n\t\t\t\t\t\t\tORDER BY id DESC";
$this->_db->setQuery($query, 0, 15);
$topics_list = $this->_db->loadObjectlist();
if ($this->_db->getErrorNum()) {
$result = array('status' => '-1', 'error' => KunenaError::getDatabaseError());
} else {
$result['status'] = '1';
$result['topiclist'] = $topics_list;
}
} else {
$result['status'] = '0';
$result['error'] = 'Error';
}
return $result;
}