isReadOnly()) pla_error(_('You cannot perform updates while server is in read-only mode')); if (! $ldapserver->haveAuthInfo()) pla_error(_('Not enough information to login to server. Please check your configuration.')); $attr = $_GET['attr']; $dn = isset($_GET['dn']) ? $_GET['dn'] : null; $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; /* * If there is only one member, convert scalar to array, * arrays are required later when processing members */ if ($num_current_members == 1) $current_members = array($current_members); sort($current_members); # 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",$config->GetValue('modify_member','posixgroupattr'))) $possible_values = array_merge($ldapserver->search(null,$base_dn, $config->GetValue('modify_member','posixfilter'),array($config->GetValue('modify_member','posixattr')))); else $possible_values = array_merge($ldapserver->search(null,$base_dn, $config->GetValue('modify_member','filter'),array($config->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('