From 5ff78daf7610c08e6b7b63b34c6f438d522a0ec3 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 5 May 2005 13:28:54 +0000 Subject: [PATCH] use cn attribute to read group name, not DN --- lam/lib/modules/posixAccount.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 4d40d662..6409c210 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -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