/grous/get_my_list returns only the IDs of the group, not their information

This commit is contained in:
Pierre HUBERT 2018-09-02 13:55:36 +02:00
parent 4f5ab6e966
commit 1ef7f662e5
2 changed files with 2 additions and 6 deletions

View File

@ -642,10 +642,6 @@ class GroupsController {
//Get the list of groups of the user //Get the list of groups of the user
$list = components()->groups->getListUser(userID); $list = components()->groups->getListUser(userID);
//Parse list
foreach($list as $num => $info)
$list[$num] = self::GroupInfoToAPI($info);
return $list; return $list;

View File

@ -71,7 +71,7 @@ class GroupsComponent {
* Get the list of groups of a user * Get the list of groups of a user
* *
* @param int $userID The ID of the target 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 { public function getListUser(int $userID) : array {
@ -86,7 +86,7 @@ class GroupsComponent {
//Parse results //Parse results
$info = array(); $info = array();
foreach($groups as $group) foreach($groups as $group)
$info[] = $this->get_info($group["groups_id"]); $info[] = $group["groups_id"];
return $info; return $info;
} }