[horde] Groups with Ldap-driver in Horde4

Harald Hutter hutter at ihs.ac.at
Tue Sep 14 09:51:09 UTC 2010


On Tuesday 07 September 2010, Michael Gröne wrote:
>   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
The function is called getGroupMemberships. Just to be sure we're talking
about the same thing.

>              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);
>              }
We have an Windows 2008 AD Server. If I add a line printing $result[$i]['dn'] 
to the log file I see one entry for every group I'm in. $result[$i]['dn'] 
prints the full DN. So this seems ok.

Still I can't see any groups by clicking administration - Groups, but Group 
information is available if I look at the share tab in Kronolith (in the 
window that opens if you click on the arrow-right icon next to your 
calendar.)

regards,
harald

> ------------
> 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