diff --git a/src/Model/Table/LdapConnectionsTable.php b/src/Model/Table/LdapConnectionsTable.php index 8005d69..0b607cf 100755 --- a/src/Model/Table/LdapConnectionsTable.php +++ b/src/Model/Table/LdapConnectionsTable.php @@ -187,7 +187,7 @@ class LdapConnectionsTable extends AppTable } // $userName = login - public function getUserAttributes($userName, $ldapConnection, $LDAP_ANONYMOUS=true, $filter='', $just_these=[]) + public function getUserAttributes($userName, $ldapConnection='', $LDAP_ANONYMOUS=true, $filter='', $just_these=[]) { try { @@ -207,10 +207,10 @@ class LdapConnectionsTable extends AppTable */ // CRAL //$results = ldap_search($ldapConnection, $this->baseDn, $filter); - 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) ); + //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