From 42875d7e967c9eebbb0683149e58c59ed48545a0 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 31 Dec 2015 12:35:07 +0100 Subject: [PATCH] Fixed in the function 'agents_get_group_agents' get agents with noACL flag is setted. TICKET: #3166 --- pandora_console/include/functions_agents.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_agents.php b/pandora_console/include/functions_agents.php index fcf2f90fe7..2bbf45cd08 100644 --- a/pandora_console/include/functions_agents.php +++ b/pandora_console/include/functions_agents.php @@ -770,13 +770,18 @@ function agents_get_group_agents ($id_group = 0, $search = false, $case = "lower if ($childGroups) { if (is_array($id_group)) { foreach ($id_group as $parent) { - $id_group = array_merge($id_group, groups_get_id_recursive($parent, true)); + $id_group = array_merge($id_group, + groups_get_id_recursive($parent, true)); } } else { $id_group = groups_get_id_recursive($id_group, true); } - $id_group = array_keys(users_get_groups(false, "AR", true, false, (array)$id_group)); + + if (!$noACL) { + $id_group = array_keys( + users_get_groups(false, "AR", true, false, (array)$id_group)); + } } if (is_array($id_group)) {