/** * Returns a list of users belonging to a specified group * * @param class_admin_formgenerator $objForm * * @return string * @permissions edit */ protected function actionGroupMember(class_admin_formgenerator $objForm = null) { $strReturn = ""; if ($this->getSystemid() != "") { $objGroup = new class_module_user_group($this->getSystemid()); //validate possible blocked groups $bitRenderEdit = $this->isGroupEditable($objGroup); $objSourceGroup = $objGroup->getObjSourceGroup(); $strReturn .= $this->objToolkit->formHeadline($this->getLang("group_memberlist") . "\"" . $objGroup->getStrName() . "\""); $objUsersources = new class_module_user_sourcefactory(); if ($objUsersources->getUsersource($objGroup->getStrSubsystem())->getMembersEditable() && $bitRenderEdit) { if ($objForm == null) { $objForm = $this->getGroupMemberForm($objGroup); } $arrFolder = $this->objToolkit->getLayoutFolder($objForm->renderForm(getLinkAdminHref($this->getArrModule("modul"), "addUserToGroup")), $this->getLang("group_add_user")); $strReturn .= $this->objToolkit->getFieldset($arrFolder[1], $arrFolder[0]); } $objIterator = new class_array_section_iterator($objSourceGroup->getNumberOfMembers()); $objIterator->setPageNumber((int) ($this->getParam("pv") != "" ? $this->getParam("pv") : 1)); $objIterator->setArraySection($objSourceGroup->getUserIdsForGroup($objIterator->calculateStartPos(), $objIterator->calculateEndPos())); $strReturn .= $this->objToolkit->listHeader(); $intI = 0; foreach ($objIterator as $strSingleMemberId) { $objSingleMember = new class_module_user_user($strSingleMemberId); $strAction = ""; if ($objUsersources->getUsersource($objGroup->getStrSubsystem())->getMembersEditable() && $bitRenderEdit) { $strAction .= $this->objToolkit->listDeleteButton($objSingleMember->getStrUsername() . " (" . $objSingleMember->getStrForename() . " " . $objSingleMember->getStrName() . ")", $this->getLang("mitglied_loeschen_frage"), class_link::getLinkAdminHref($this->getArrModule("modul"), "groupMemberDelete", "&groupid=" . $objGroup->getSystemid() . "&userid=" . $objSingleMember->getSystemid())); } $strReturn .= $this->objToolkit->genericAdminList($objSingleMember->getSystemid(), $objSingleMember->getStrDisplayName(), getImageAdmin("icon_user"), $strAction, $intI++); } $strReturn .= $this->objToolkit->listFooter() . $this->objToolkit->getPageview($objIterator, "user", "groupMember", "systemid=" . $this->getSystemid()); } return $strReturn; }