In ldapgroups_user_login, _ldapgroups_detect_groups might return false and pass that value into array_intersect in the next statement.

Further down, it's returning true if $groups is false. Should this statement be right after the assignment of $groups?
I think at least it should detect the contents of $groups before assuming it's an array.

This is generating the error:

warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in ldap_integration/ldapgroups.inc on line 30
CommentFileSizeAuthor
#2 ldap-integration-groups-err.png49.92 KBaritztg

Comments

davea’s picture

Subscribing....

aritztg’s picture

StatusFileSize
new49.92 KB

Subscribing....

verta’s picture

I think this is happening on our site that is using a patch to let the server's windows authentication handle the login automatically. Subscribing.

aritztg’s picture

We solved the problem by adding a row in the users table with a zero value in the UID column and the other columns as empty.
The problem was in a line with user_load(0);

johnbarclay’s picture

Version: master » 6.x-1.x-dev
cgmonroe’s picture

Status: Active » Fixed

The changes just committed should correct this.

For details of these changes see #1475272: 6.x-1.0 Release Candidate 1 Status

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.