Skip to content

Commit eebcc21

Browse files
committed
fix(dropdownfield): incomplete group restriction
1 parent 8bc96d3 commit eebcc21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

inc/field/dropdownfield.class.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,9 @@ private function getMyGroups($userID) {
594594
if ($result->count() === 0) {
595595
return [];
596596
}
597+
$a_groups = [];
597598
foreach ($result as $data) {
598-
$a_groups = $dbUtil->getAncestorsOf("glpi_groups", $data["groups_id"]);
599+
$a_groups = $a_groups + $dbUtil->getAncestorsOf("glpi_groups", $data["groups_id"]);
599600
$a_groups[$data["groups_id"]] = $data["groups_id"];
600601
}
601602
return $a_groups;

0 commit comments

Comments
 (0)