Controller/AccountsController.php
public function addUserToGroup($id, array $groupIds)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode(['groupIds' => $groupIds], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->post('v1/accounts/users/' . $id . '/groups', $parameters);
        $result = new User($result);

        return $result;
    }
public function addUserToGroup($id, array $groupIds)
    {
        $parameters = [
            'query' => [],
            'body' => json_encode(['groupIds' => $groupIds], JSON_UNESCAPED_UNICODE),
            'headers' => [],
        ];

        $result = $this->post('v1/accounts/users/' . $id . '/groups', $parameters);
        $result = new User($result);

        return $result;
    }
public function addUserToGroup ( $ id , array $ groupIds ) { $ parameters = [ 'query' => [ ] , 'body' => json_encode ( [ 'groupIds' => $ groupIds ] , JSON_UNESCAPED_UNICODE ) , 'headers' => [ ] , ] ; $ result = $ this -> post ( 'v1/accounts/users/' . $ id . '/groups' , $ parameters ) ; $ result = new User ( $ result ) ; return $ result ; }
Add the user to one or more groups.

@param  int   $id
@param  int[] $groupIds an array of int values
@return User
Add the user to one or more groups .