In _ldapauth_user_lookup() when the search() method is called, the $attributes argument isn't passed, and in my case, this is causing only the dn to be returned. I need it to also return username attribute (sAMAccountName in my case) so that it passes through the rest of the logic for a successful auth.

What I'm running into could very well be an edge case, but the fix seems pretty harmless. I simply added array($name_attr) when the search() method is called, which fixes my issue.

Patch attached.

CommentFileSizeAuthor
ldapauth_attributes.patch875 bytesmsonnabaum

Comments

cgmonroe’s picture

Status: Needs review » Fixed

This should be fixed in the dev version. All searches and retrieveAttribute calls now include a specific list of needed attributes... and there's a hook if you want to add your site specific stuff to it via another module.

Status: Fixed » Closed (fixed)

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