From 1ef7f662e54641250791e3e89854c575ce8ba5e5 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 2 Sep 2018 13:55:36 +0200 Subject: [PATCH] /grous/get_my_list returns only the IDs of the group, not their information --- RestControllers/GroupsController.php | 4 ---- classes/components/GroupsComponent.php | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/RestControllers/GroupsController.php b/RestControllers/GroupsController.php index 3dc700a..0ead567 100644 --- a/RestControllers/GroupsController.php +++ b/RestControllers/GroupsController.php @@ -642,10 +642,6 @@ class GroupsController { //Get the list of groups of the user $list = components()->groups->getListUser(userID); - - //Parse list - foreach($list as $num => $info) - $list[$num] = self::GroupInfoToAPI($info); return $list; diff --git a/classes/components/GroupsComponent.php b/classes/components/GroupsComponent.php index b43757c..fe018e0 100644 --- a/classes/components/GroupsComponent.php +++ b/classes/components/GroupsComponent.php @@ -71,7 +71,7 @@ class GroupsComponent { * Get the list of groups of a user * * @param int $userID The ID of the target user - * @return array The list of groups of the user + * @return array The list of groups of the user (the IDs of the groups) */ public function getListUser(int $userID) : array { @@ -86,7 +86,7 @@ class GroupsComponent { //Parse results $info = array(); foreach($groups as $group) - $info[] = $this->get_info($group["groups_id"]); + $info[] = $group["groups_id"]; return $info; }