AD Creates Extra Array Level for Groups
erikwebb - April 28, 2009 - 16:21
| Project: | LDAP integration |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | miglius |
| Status: | closed |
| Issue tags: | ldapgroups |
Jump to:
Description
When pulling groups based on an LDAP attribute (in this case 'memberOf'), LDAP groups is creates a multi-level array of these groups instead of a single. Because of this, the array_intersect() call in ldapgroups.module, when allowing only users with certain groups to authenticate, is not finding any intersection.
The array from AD:
Array
(
[0] => Array
(
[0] => CN=xxx,OU=xxx,OU=xxx,OU=xxx,DC=xxx,DC=xxx,DC=edu
[1] => CN=xxx1,OU=xxx,OU=xxx,OU=xxx,DC=xxx,DC=xxx,DC=edu
)
)The array from $groups_allow attempting to intersect with it:
Array
(
[0] => CN=xxx,OU=xxx,OU=xxx,OU=xxx,DC=xxx,DC=xxx,DC=edu
)I've removed the details obviously, but the problem is with having the extra array level. I can fix this by changing
<?php
$groups_allow
?><?php
$groups_allow[0]
?>Thanks,
Erik

#1
Can you update the ldap_integration code to the latest dev version and try again? Some changes made two weeks ago might have fixed this as well.
#2
#3
The newest version has fixed that issue. Thank you very much. Great work!