always use LDAP v3 protocol
This commit is contained in:
parent
60c2e7db96
commit
5f1d8483b5
|
@ -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());
|
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());
|
else $this->server = @ldap_connect("ldap://" . $this->conf->get_Host(), $this->conf->get_Port());
|
||||||
if ($this->server) {
|
if ($this->server) {
|
||||||
|
// use LDAPv3
|
||||||
|
ldap_set_option($this->server, LDAP_OPT_PROTOCOL_VERSION, 3);
|
||||||
$bind = @ldap_bind($this->server, $user, $passwd);
|
$bind = @ldap_bind($this->server, $user, $passwd);
|
||||||
if ($bind) {
|
if ($bind) {
|
||||||
// return server handle
|
// return server handle
|
||||||
|
|
Loading…
Reference in New Issue