use cn attribute to read group name, not DN

This commit is contained in:
Roland Gruber 2005-05-05 13:28:54 +00:00
parent 4bab674b29
commit 5ff78daf76
1 changed files with 4 additions and 3 deletions

View File

@ -925,10 +925,11 @@ class posixAccount extends baseModule {
*/
function display_html_group(&$post) {
// load list with all groups
$dn_groups = $_SESSION['cache']->get_cache('gidNumber', 'posixGroup', 'group');
$dn_groups = $_SESSION['cache']->get_cache('cn', 'posixGroup', 'group');
$DNs = array_keys($dn_groups);
foreach ($DNs as $DN)
$groups[] = substr($DN, 3, strpos($DN, ',')-3);
foreach ($DNs as $DN) {
$groups[] = $dn_groups[$DN][0];
}
// remove groups the user is member of from grouplist
$groups = array_delete($this->groups, $groups);
// Remove primary group from grouplist