From 2730813c5bc10434a301caa4e67a808fa173cfe7 Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Fri, 14 Dec 2018 13:00:22 +0100 Subject: [PATCH] petit bugfix ldap anonymous --- src/Model/Table/LdapConnectionsTable.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Model/Table/LdapConnectionsTable.php b/src/Model/Table/LdapConnectionsTable.php index 0476ba1..b9299ad 100755 --- a/src/Model/Table/LdapConnectionsTable.php +++ b/src/Model/Table/LdapConnectionsTable.php @@ -200,7 +200,10 @@ class LdapConnectionsTable extends AppTable /* CRAL */ //$results = ldap_search($ldapConnection, $this->baseDn, $filter); - $results = ldap_search($ldapConnection, $this->baseDn, $filter, $just_these) or die("Could not search to LDAP server response was: " . ldap_error($ldapconn) ); + if ($LDAP_ANONYMOUS) + $results = ldap_search($ldapConnection, $this->baseDn, $filter) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) ); + else + $results = ldap_search($ldapConnection, $this->baseDn, $filter, $just_these) or die("Could not search to LDAP server response was: " . ldap_error($ldapConnection) ); $info = ldap_get_entries($ldapConnection, $results); //echo $info["count"]." entries returned\n"; return $info; -- libgit2 0.21.2