/** * Get selected items for table action * * @return array */ protected function getActionUserIds() { if ($_POST["select_cmd_all"]) { include_once "./Services/User/classes/class.ilUserTableGUI.php"; $utab = new ilUserTableGUI($this, "view", ilUserTableGUI::MODE_USER_FOLDER, false); return $utab->getUserIdsForFilter(); } else { return $_POST["id"]; } }
function index($show_delete = false) { global $ilUser, $rbacreview, $rbacsystem; $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.cat_admin_users.html', "Modules/Category"); if (count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) { $this->toolbar->addButton($this->lng->txt('add_user'), $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')); $this->toolbar->addButton($this->lng->txt('import_users'), $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')); } else { ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to')); } if ($show_delete) { $this->tpl->setCurrentBlock("confirm_delete"); $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this)); $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel')); $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers'); $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete')); $this->tpl->parseCurrentBlock(); } $table = new ilUserTableGUI($this, 'index', ilUserTableGUI::MODE_LOCAL_USER); $this->tpl->setVariable('USERS_TABLE', $table->getHTML()); return true; }
function listUsersObject($show_delete = false) { global $ilUser, $rbacreview, $ilToolbar; include_once './Services/User/classes/class.ilLocalUser.php'; include_once './Services/User/classes/class.ilObjUserGUI.php'; global $rbacsystem, $rbacreview; if (!$rbacsystem->checkAccess("cat_administrate_users", $this->object->getRefId())) { $this->ilias->raiseError($this->lng->txt("msg_no_perm_admin_users"), $this->ilias->error_obj->MESSAGE); } $this->tabs_gui->setTabActive('administrate_users'); $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.cat_admin_users.html', "Modules/Category"); if (count($rbacreview->getGlobalAssignableRoles()) or in_array(SYSTEM_ROLE_ID, $rbacreview->assignedRoles($ilUser->getId()))) { $ilToolbar->addButton($this->lng->txt('add_user'), $this->ctrl->getLinkTargetByClass('ilobjusergui', 'create')); $ilToolbar->addButton($this->lng->txt('import_users'), $this->ctrl->getLinkTargetByClass('ilobjuserfoldergui', 'importUserForm')); } else { ilUtil::sendInfo($this->lng->txt('no_roles_user_can_be_assigned_to')); } if ($show_delete) { $this->tpl->setCurrentBlock("confirm_delete"); $this->tpl->setVariable("CONFIRM_FORMACTION", $this->ctrl->getFormAction($this)); $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel')); $this->tpl->setVariable("CONFIRM_CMD", 'performDeleteUsers'); $this->tpl->setVariable("TXT_CONFIRM", $this->lng->txt('delete')); $this->tpl->parseCurrentBlock(); } $this->lng->loadLanguageModule('user'); include_once "./Services/User/classes/class.ilUserTableGUI.php"; $utab = new ilUserTableGUI($this, 'listUsers', ilUserTableGUI::MODE_LOCAL_USER); $this->tpl->setVariable('USERS_TABLE', $utab->getHTML()); return true; }