isReadOnly()) error(_('You cannot perform updates while server is in read-only mode'),'error','index.php'); if (! $ldapserver->haveAuthInfo()) error(_('Not enough information to login to server. Please check your configuration.'),'error','index.php'); $attr = get_request('attr','GET'); $dn = get_request('dn','GET'); $encoded_dn = rawurlencode($dn); $encoded_attr = rawurlencode($attr); if (! is_null($dn)) $rdn = get_rdn($dn); else $rdn = null; # Get all current group members $current_members = $ldapserver->getDNAttr($dn,$attr); if ($current_members) $num_current_members = (is_array($current_members) ? count($current_members) : 1); else $num_current_members = 0; usort($current_members,'pla_compare_dns'); # Loop through all base dn's and search possible member entries foreach ($ldapserver->getBaseDN() as $base_dn) { # Get all entries that can be added to the group if (preg_match("/^$attr$/i",$_SESSION[APPCONFIG]->GetValue('modify_member','posixgroupattr'))) $possible_values = array_merge($ldapserver->search(null,$base_dn, $_SESSION[APPCONFIG]->GetValue('modify_member','posixfilter'), array($_SESSION[APPCONFIG]->GetValue('modify_member','posixattr')))); else $possible_values = array_merge($ldapserver->search(null,$base_dn, $_SESSION[APPCONFIG]->GetValue('modify_member','filter'), array($_SESSION[APPCONFIG]->GetValue('modify_member','attr')))); } if ($possible_values) $num_possible_values = (is_array($possible_values) ? count($possible_values) : 1); else $num_possible_values = 0; sort($possible_values); include './header.php'; echo '
'; printf('