From 332f9d57d783728d1ecb75f058c751022d4c4b52 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 16 Aug 2003 08:30:05 +0000 Subject: [PATCH] start TLS if possible --- lam/lib/ldap.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lam/lib/ldap.inc b/lam/lib/ldap.inc index 4367bf9e..b501d825 100644 --- a/lam/lib/ldap.inc +++ b/lam/lib/ldap.inc @@ -96,6 +96,8 @@ class Ldap{ if ($this->server) { // use LDAPv3 ldap_set_option($this->server, LDAP_OPT_PROTOCOL_VERSION, 3); + // start TLS if possible + if (function_exists('ldap_start_tls')) ldap_start_tls($this->server); $bind = @ldap_bind($this->server, $user, $passwd); if ($bind) { // return server handle