mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-27 07:49:27 +00:00
/grous/get_my_list returns only the IDs of the group, not their information
This commit is contained in:
parent
4f5ab6e966
commit
1ef7f662e5
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user