diff options
author | Francois Ferrand <thetypz@gmail.com> | 2014-07-03 10:25:25 +0200 |
---|---|---|
committer | Francois Ferrand <thetypz@gmail.com> | 2014-07-03 10:29:21 +0200 |
commit | 0a3049c17293e6b7b416b4264ace1f373bda6728 (patch) | |
tree | 3860b7dd2db87e1aff4db8b0fc5ded0b4582e53e /app/Model | |
parent | 98bd694e2bd47b0c4ed8247546b1903c762ffdde (diff) |
Add option to disable SSL certificate verification for LDAP.
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/Ldap.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Model/Ldap.php b/app/Model/Ldap.php index 9e7d0445..4e605eb2 100644 --- a/app/Model/Ldap.php +++ b/app/Model/Ldap.php @@ -24,6 +24,11 @@ class Ldap extends Base die('The PHP LDAP extension is required'); } + if (!LDAP_SSL_VERIFY) { + //Skip SSL certificate verification + putenv('LDAPTLS_REQCERT=never'); + } + $ldap = ldap_connect(LDAP_SERVER, LDAP_PORT); if (! is_resource($ldap)) { |