From 17af599ce4541101ff357c25a2f6e561cf9e2771 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Tue, 11 Oct 2016 14:47:03 +0200 Subject: [PATCH] Use _bind() in getConnection() If the LDAP server does not support anonymous bindings authentication will fail. Use the provided credentials to fix the getConnection() logic. --- auth-ldap/authentication.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/auth-ldap/authentication.php b/auth-ldap/authentication.php index 34d78ea..ce2b121 100644 --- a/auth-ldap/authentication.php +++ b/auth-ldap/authentication.php @@ -152,8 +152,7 @@ function getConnection($force_reconnect=false) { foreach ($this->getServers() as $s) { $params = $defaults + $s; $c = new Net_LDAP2($params); - $r = $c->bind(); - if (!PEAR::isError($r)) { + if ($this->_bind($c)) { $connection = $c; return $c; }