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.
--
Mit freundlichen Grüßen
Andreas Oster
NOVA Elektroanlagen GmbH
Carl-Zeiss-Str. 3
D-76275 Ettlingen
Tel: 07243/5490-22
FAX: 07243/5490-55
Web: http://www.novanetwork.de
begin:vcard
fn:Andreas Oster
n:Oster;Andreas
org:NOVA Elektroanlagen GmbH;Sales/Support
adr;quoted-printable:;;Carl-Zeiss-Str. 3;Ettlingen;Baden-W=C3=BCrttemberg;76275;Deutschland
email;internet:[EMAIL PROTECTED]
title:Herr
tel;work:+49 7243 5490 22
tel;fax:+49 7243 5490 55
x-mozilla-html:FALSE
url:http://www.novanetwork.de
version:2.1
end:vcard