As an example of a query I’m using somewhere, certain details removed, obviously:
(&(objectclass=person)(memberof=CN=Principals,OU=All at Groups,OU=xxx,DC=xxx,DC=xxx,DC=xxx,DC=xxx))
It’s a good idea to include something like this in a screenshot, so I’ll do that soon-ish. As for documentation, well, I’m not going to say I’m good at documenting, but my plugins tend to be worse than my other stuff. I think that’s because I’m usually banging them out quickly to fill a specific need rather than other, more planned, projects.
Huge mistake: I forgot to mention I’m using OpenLDAP, not AD.
Could this be the reason why my queries never work?
I just tried this one you posted here and got nothing again.
I’m afraid I don’t have an OpenLDAP server to test against, but I can try to work through a few things with you.
Is the wordpress server is configured to authenticate users against this OpenLDAP server? That is to say, do you login to the wordpress install using the names and passwords from the LDAP server?
Yes, I’m using another plugin for logging users in so wp_get_current_user() returns an user id from my LDAP server.
Actually Im using 2 plugins since I also have to migrate from OpenLDAP to samba4 in the meantime (yeah…)
so,
https://ww.wp.xz.cn/plugins/authldap/
this one for OpenLDAP (current)
and this one (disabled)
https://ww.wp.xz.cn/plugins/active-directory-integration/
currently in tests with new samba4 environment
We’ll just assume that parts working correctly, then. A quick google search pointed me towards a SO page (http://stackoverflow.com/questions/15108969/php-ldap-search-no-such-object). Based on the error you are seeing, it seems likely that the search base field in your settings is not configured correctly.
Now this may seem insensitive, but keep in mind that I do want to help you out here. I don’t want to waste your time with basic explanations and I don’t want to say something that goes over your head, so establishing a base line is probably a good idea. So, can you explain to me your level of knowledge regarding LDAP? In particular, do you know how to properly construct and LDAP query?
As I haven’t heard anything back on this topic, I’m closing it.