summaryrefslogtreecommitdiff
path: root/app/Auth/Ldap.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-12-06 13:23:48 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-12-06 13:23:48 -0500
commit18bba794131e18b6ae81dff897bc196f43ca9d63 (patch)
treee7c7aab30e5e386c8cc6addcd24669c27f4aa6b3 /app/Auth/Ldap.php
parent52c1a3b374d6c34abd9016a102bb73dc5cce895e (diff)
Add support for ldap_start_tls()
Diffstat (limited to 'app/Auth/Ldap.php')
-rw-r--r--app/Auth/Ldap.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Auth/Ldap.php b/app/Auth/Ldap.php
index 5bb60275..82307e8c 100644
--- a/app/Auth/Ldap.php
+++ b/app/Auth/Ldap.php
@@ -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;
}