Skip to content
Snippets Groups Projects
Commit 0043bc25 authored by Eduardo Alvarez Fernandez's avatar Eduardo Alvarez Fernandez
Browse files

Fix Warning: ldap_get_entries() expects exactly 2

parent 80861ac4
Branches
Tags
No related merge requests found
...@@ -70,7 +70,7 @@ Class CERNLdapService { ...@@ -70,7 +70,7 @@ Class CERNLdapService {
*/ */
protected function getEmailAddress($entry) { protected function getEmailAddress($entry) {
$result = ldap_search($this->conn, $entry, "CN=*", array('mail'), NULL, 0); $result = ldap_search($this->conn, $entry, "CN=*", array('mail'), NULL, 0);
$entries = $this->cleanUpEntry(ldap_get_entries($result)); $entries = $this->cleanUpEntry(ldap_get_entries($this->conn, $result));
return (array_key_exists('mail', $entries["$entry"])) ? $entries["$entry"]['mail'] : ""; return (array_key_exists('mail', $entries["$entry"])) ? $entries["$entry"]['mail'] : "";
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment