示例#1
0
文件: SSI.php 项目: norv/EosAlpha
function ssi_fetchGroupMembers($group_id, $output_method = 'echo')
{
    $query_where = '
		id_group = {int:id_group}
		OR id_post_group = {int:id_group}
		OR FIND_IN_SET({int:id_group}, additional_groups)';
    $query_where_params = array('id_group' => $group_id);
    return ssi_queryMembers($query_where, $query_where_params, '', 'real_name', $output_method);
}
示例#2
0
文件: SSI.php 项目: scripple/Elkarte
/**
 * Fetch a specific member.
 *
 * @param null $group_id
 * @param string $output_method = 'echo'
 */
function ssi_fetchGroupMembers($group_id = null, $output_method = 'echo')
{
    if ($group_id === null) {
        return;
    }
    return ssi_queryMembers('group_list', is_array($group_id) ? $group_id : array($group_id), '', 'real_name', $output_method);
}
 /**
  * Short description
  *
  * Long description
  *
  * @param
  * @return
  */
 protected function query_members()
 {
     try {
         $this->loadSSI();
     } catch (Exception $e) {
         throw new \Exception($e->getMessage());
     }
     $this->query_where_params = unserialize($this->query_where_params);
     if ('echo' == $this->output_method) {
         ob_start();
         ssi_queryMembers($this->query_where, $this->query_where_params, $this->query_limit, $this->query_order, $this->output_method);
         $this->data = ob_get_contents();
         ob_end_clean();
     } else {
         $this->data = ssi_queryMembers($this->query_where, $this->query_where_params, $this->query_limit, $this->query_order, $this->output_method);
     }
 }