Hello,
I am new to this list and want to share the changes I have made to the rcube_ldap.inc to access our LDAP directory (bind to LDAp with a dedicated readonly user)
I saw that there is a already a bind function but since I could not figure out how to use it ( i have only little programming skills) i have put the code directly into the connect function.
At the moment it is just a hardcoded hack :)
< rcube_ldap.diff >
32a33,36
// modified by Andreas Thuesday 04 07 2006 var $ldapbind; // end modification
56a61,66
// modified by Andreas Thuesday 04 07 2006 $ldaprdn = 'binddn'; // bind rdn or dn $ldappass = 'bindpassword'; // bind password // end modification
66a77,92
} // modified by Andreas Thuesday 04 07 2006 if ($this->conn) { // binden zum ldap server if (ldap_set_option($this->conn, LDAP_OPT_PROTOCOL_VERSION, 3)) { $ldapbind = ldap_bind($lc, $ldaprdn, $ldappass); // check bind if (!$ldapbind) { raise_error(array("type" => "ldap", "message" =>
"Could not bind to LDAP server"),TRUE);
} } else raise_error(array("type" => "ldap", "message" => "Could not
bind to LDAP server with LDAP_v3"),TRUE);
// end modification
maybe it is of use for somebody.