Closed (fixed)
Project:
LDAP integration
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Feb 2007 at 19:54 UTC
Updated:
20 Feb 2007 at 02:33 UTC
In ldapgroups.module, you will get a failure at line 250 if ldapgroups_roles_filter has NOT been uncommented in ldap_integration/ldapgroups.conf.php
This is because $groups will never get assigned to $roles
Suggested solution:
On Line 243 of ldapgroups.module, add:
$roles = $groups;
Comments
Comment #1
kreaper commentedfixed in HEAD
check for empty arrays
//need to check for empty roles
if ($roles) {
foreach ($roles as $role) {
_ldapgroups_create_role($role);
_ldapgroups_grant_role($user, $role);
}
}
Comment #2
dcartertod commentedI'm not 100% sure this fixes the problem. I'm reproducing the revised code below with my suggested revision.
$groups can contain a valid array, but if you haven't uncommented the function in the sub-folder, then those groups will never be granted as roles.
Thanks
Comment #3
kreaper commentedGottit -- I won't have access to my mac till tomorrow - so I can update the code then. In the mean time, if scafmac gets to it first, he can update the code as well.
Comment #4
kreaper commentedComment #5
kreaper commentedCommitted to HEAD
Comment #6
kreaper commentedbugfix confirmed by others