Active
Project:
Organic groups LDAP
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2011 at 10:46 UTC
Updated:
20 Feb 2012 at 04:38 UTC
line 55 should become:
if (strstr($map['ldap'], $group)) {
instead of
if (strstr($group, $map['ldap'])) {
Comments
Comment #1
nathan1056 commentedFor me it wasn't a matter of being in the wrong order so much as the case sensitive comparison. Active Directory returns the group membership as CN=group1,OU=OG,DC=EXAMPLE,DC=COM but the configuration examples given are all lowercase so that's how I entered them. I couldn't figure out why it wasn't working until I tossed in some echo statements so I could see what was going on.
To change it to a case insensitive search line 55 should be:
if (stristr($group, $map['ldap'])) {
Change strstr to stristr.
This is also in 6.x-1.x-dev but it got bumped down to line 56.
A better way?
If you want to make really sure you're matching the right group but still allow for case insensitive comparison you could change it to this:
if (strtolower($group) == strtolower($map['ldap'])) {
I've tested both ways and they worked for me.
Comment #2
jzornig commentedPatch #1 worked for me.