diff --git a/lib/authentication/class.AuthLdap.php b/lib/authentication/class.AuthLdap.php index 979443d..be5429d 100644 --- a/lib/authentication/class.AuthLdap.php +++ b/lib/authentication/class.AuthLdap.php @@ -64,11 +64,16 @@ class AuthLdap { foreach ($this->server as $key => $host) { $this->connection = ldap_connect( $host); if ( $this->connection) { - // Connected, now try binding.... - if ( $this->result=@ldap_bind( $this->connection)) { - // Bound OK! - $this->bound = $host; + // don't try anon bind for ad + if ($this->serverType == "ActiveDirectory") { return true; + } else { + // Connected, now try binding.... + if ( $this->result=@ldap_bind( $this->connection)) { + // Bound OK! + $this->bound = $host; + return true; + } } } }