I was having a problem where the module wasn't grabbing the email attribute from LDAP. As it turns out, the part of code that's trying to get the email attribute is binding as the user trying to log in. The LDAP server we're using doesn't seem to allow users to even view their own email attribute.
I have the module configured for non-anonymous searches, and the code didn't seem to be taking advantage of that. I'm submitting a simple patch that seems to work for me. It basically checks to see if the ldap_search_as_dn variable is set. If so, close the current ldap connection, grab the ldap_search_as_pass, and re-bind to the LDAP server.
| Comment | File | Size | Author |
|---|---|---|---|
| non-anonymous.patch.txt | 521 bytes | js1 |
Comments
Comment #1
pablobm commentedThanks for the tip. Yes, it looks to me I'm connect()-ing as the wrong user there. I changed the connect() line so it logs in as the "editor super-user", as it does when accessing anything else from ldapdata. It should therefore work now properly.
Comment #2
pablobm commentedComment #3
(not verified) commented