$vLdapGroup->required(); if ($request->isPost() && $request->valid($vLdapGroup)) { $ldapGroupManager = new LDAP_ProjectGroupManager($ldapPlugin->getLdap()); $ldapGroupManager->setId($groupId); $ldapGroupManager->setGroupName($request->get('ldap_group')); if ($request->existAndNonEmpty('delete')) { // // Remove link between Project Members and LDAP Group // $ldapGroupManager->unbindFromBindLdap(); $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId); } elseif ($request->existAndNonEmpty('update')) { // // Perform Project Members <-> LDAP Group synchro // $ldapGroupManager->bindWithLdap($bindOption); $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId); } elseif ($request->exist('cancel')) { // // Cancel operations // $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId); } else { // // Display to user what will be done with project members. // $toRemove = $ldapGroupManager->getUsersToBeRemoved($bindOption); $toAdd = $ldapGroupManager->getUsersToBeAdded($bindOption); $notImpacted = $ldapGroupManager->getUsersNotImpacted($bindOption); if (is_array($toAdd)) { // Display
$vLdapGroup->required(); if ($request->isPost() && $request->valid($vLdapGroup)) { $ldapGroupManager = new LDAP_ProjectGroupManager($ldapPlugin->getLdap()); $ldapGroupManager->setId($groupId); $ldapGroupManager->setGroupName($request->get('ldap_group')); if ($request->existAndNonEmpty('delete')) { // // Remove link between Project Members and LDAP Group // $ldapGroupManager->unbindFromBindLdap(); $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId); } elseif ($request->existAndNonEmpty('update')) { // // Perform Project Members <-> LDAP Group synchro // $ldapGroupManager->bindWithLdap($bindOption, $synchro); $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId); } elseif ($request->exist('cancel')) { // // Cancel operations // $GLOBALS['Response']->redirect('/project/admin/index.php?group_id=' . $groupId); } else { // // Display to user what will be done with project members. // $toRemove = $ldapGroupManager->getUsersToBeRemoved($bindOption); $toAdd = $ldapGroupManager->getUsersToBeAdded($bindOption); $notImpacted = $ldapGroupManager->getUsersNotImpacted($bindOption); if (is_array($toAdd)) { // Display