line 55 should become:
if (strstr($map['ldap'], $group)) {

instead of
if (strstr($group, $map['ldap'])) {

Comments

nathan1056’s picture

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

jzornig’s picture

Version: 6.x-1.0-alpha2 » 6.x-1.x-dev

Patch #1 worked for me.