always use LDAP v3 protocol

This commit is contained in:
Roland Gruber 2003-03-16 10:58:54 +00:00
parent 60c2e7db96
commit 5f1d8483b5
1 changed files with 2 additions and 0 deletions

View File

@ -98,6 +98,8 @@ class Ldap{
if ($this->conf->get_SSL() == "True") $this->server = @ldap_connect("ldaps://" . $this->conf->get_Host(), $this->conf->get_Port());
else $this->server = @ldap_connect("ldap://" . $this->conf->get_Host(), $this->conf->get_Port());
if ($this->server) {
// use LDAPv3
ldap_set_option($this->server, LDAP_OPT_PROTOCOL_VERSION, 3);
$bind = @ldap_bind($this->server, $user, $passwd);
if ($bind) {
// return server handle