On your config page, it would look similar to this:
Authentication String: "o=MyCompany, c=US";
Query to Find User: "uid=%1"
LDAP DN name used to connect: _blank_
Password for LDAP DN used to connect: _blank_
In this codeblock:
Code: Select all
if ($this->get_config('auth_query') == '') { // standard LDAP with anon access
/* .. snip .. */
} else { // LDAP with protected access and messy schema
/* .. snip .. */
}
My proposed solution is to either handle the protected access binding prior to this code block:
Code: Select all
if (the config is set with the LDAP DN used to connect parameters) {
/* .. bind to restricted access LDAP server .. */
}
if ($this->get_config('auth_query') == '') { // standard LDAP
/* .. snip .. */
} else { // LDAP with messy schema
/* .. snip .. */
}
Code: Select all
if ($r = @ldap_search($ds, $this->get_config('rdn'), $auth_query)) {Code: Select all
if (the config is set with the LDAP DN used to connect parameters) {
/* .. bind to restricted access LDAP server .. */
}If any of you find yourself in this particular scenario, I hope this helps if it doesn't make it into the official release of the plugin.