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; }