[horde] Groups with Ldap-driver in Horde4

Michael Gröne michael.groene at zew.uni-hannover.de
Tue Sep 7 13:12:55 UTC 2010


  Hello,

in H3 it didn't work for me, in H4 it doesn't work, too.
The problem is to get group memberships in the function 
getGroupMembers() in ldap.php.

For H4 I changed the code as seen below, which is working for me.
Is the data structure in ldap-directories other than ActiveDirectory 
another? Maybe then there is a need for a switch in the config?

Part of getGroupMembers in lib/Horde/Group/ldap.php
             for ($i = 0; $i < $result['count']; $i++) {
                 $utf8_dn = 
Horde_String::convertCharset($result[$i]['dn'], 'UTF-8', $current_charset);
                 $groups[$utf8_dn] = $this->getGroupName($utf8_dn);
             }
------------
changed to:
             for ($i = 0; $i < $result['0']['memberof']['count']; $i++) {
                 $utf8_dn = 
Horde_String::convertCharset($result['0']['memberof'][$i], 'UTF-8', 
$current_charset);
                 $groups[$utf8_dn] = $this->getGroupName($utf8_dn);
             }


kind regards,

michael




More information about the horde mailing list