Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(ldap): use define user member_attribute var (#8287)
Browse files Browse the repository at this point in the history
* fix(ldap): use define user member_attribute var

* fix(code): use PSR2
  • Loading branch information
cgagnaire committed Mar 5, 2020
1 parent 23166d1 commit 83fff4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions www/class/centreonLDAP.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,10 @@ public function listUserForGroup($groupdn)
return array();
}
$entries = ldap_get_entries($this->ds, $result);
$nbEntries = !empty($entries[0]['member']['count']) ? $entries[0]['member']['count'] : 0;
$memberAttribute = $this->groupSearchInfo['member'];
$nbEntries = !empty($entries[0][$memberAttribute]['count']) ? $entries[0][$memberAttribute]['count'] : 0;
for ($i = 0; $i < $nbEntries; $i++) {
$list[] = $entries[0]['member'][$i];
$list[] = $entries[0][$memberAttribute][$i];
}
restore_error_handler();
}
Expand Down

0 comments on commit 83fff4a

Please sign in to comment.