Commit 080a842b authored by mattwire's avatar mattwire
Browse files

Fix getting list of groups

parent 3686e268
......@@ -19,6 +19,7 @@ class CRM_Groupadmin_NavigationMenu {
// Get list of group admins (so we can get group IDs)
$groupAdminContacts = civicrm_api3('GroupAdminContact', 'get');
$groupList = [];
foreach ($groupAdminContacts as $groupAdminContact) {
$groupList[$groupAdminContact['group_id']] = 1;
}
......@@ -26,7 +27,7 @@ class CRM_Groupadmin_NavigationMenu {
// Get list of group name/title for all groups which have admins
$groups = civicrm_api3('Group', 'get', [
'return' => ["title", "name"],
'id' => ['IN' => $groupList],
'id' => ['IN' => array_keys($groupList)],
])['values'];
try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment