$groups_model = cmsCore::getModel('groups'); $groups = $groups_model->getUserGroups($user->id);
$this->select('g.id', 'id');
$this->select('g.*');
$this->joinInner('groups', 'g', 'g.id = i.group_id');
$this->filterEqual('user_id', $user_id);
if (!$this->order_by){
$this->orderBy('g.title');
}
return $this->get('groups_members');
}
WHERE 'role=2';