Add support for ldap_start_tls()

This commit is contained in:
Frédéric Guillot
2014-12-06 13:23:48 -05:00
parent 52c1a3b374
commit 18bba79413
4 changed files with 13 additions and 0 deletions

View File

@@ -136,6 +136,12 @@ class Ldap extends Base
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 1);
ldap_set_option($ldap, LDAP_OPT_TIMELIMIT, 1);
if (LDAP_START_TLS && ! @ldap_start_tls($ldap)) {
die('Unable to use ldap_start_tls()');
}
return $ldap;
}