public function __construct(&$po_request, &$po_response, $pa_view_paths = null) { parent::__construct($po_request, $po_response, $pa_view_paths); if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) { $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm")); } $this->opa_access_values = caGetUserAccessValues($this->request); $this->view->setVar("access_values", $this->opa_access_values); $t_user_groups = new ca_user_groups(); $this->opa_user_groups = $t_user_groups->getGroupList("name", "desc", $this->request->getUserID()); $this->view->setVar("user_groups", $this->opa_user_groups); $this->opo_config = caGetSetsConfig(); caSetPageCSSClasses(array("sets")); }
/** * Get list of all available user groups. If you want to get a list of the current user's groups, use getUserGroups() * * @access public * @return integer Returns associative array of groups. Key is group id, value is array containing information about the group. * * The group information array contains the following keys: * group_id (numeric id you can use in addRoles(), deleteRoles(), hasRole(), etc.) * name (the full name of the group) * name_short (an abbreviated name used for the group) * description (narrative description of group) * admin_id (user_id of group administrator) * admin_fname (first name of group administrator) * admin_lname (last name of group administrator) * admin_email (email address of group administrator) */ public function getGroupList($pn_user_id = null) { $t_group = new ca_user_groups(); return $t_group->getGroupList('name', 'asc', $pn_user_id); }
public function ListGroups() { AssetLoadManager::register('tableList'); $t_group = new ca_user_groups(); $vs_sort_field = $this->request->getParameter('sort', pString); $this->view->setVar('group_list', $t_group->getGroupList('name', 'asc', $this->request->user->getUserID())); $this->render('group_list_html.php'); }