src/Entity/XiboUserGroup.php
public function assignUser($userGroupId, $userId = [])
    {
        $this->groupId = $userGroupId;

        $this->getLogger()->info('Assigning User IDs ' . json_encode($userId) . ' To User Group ID ' . $this->groupId);
        $response = $this->doPost('/group/members/assign/' . $userGroupId, [
            'userId' => $userId
        ]);

        /** @var XiboUserGroup $userGroup */
        $userGroup = $this->hydrate($response);

        return $userGroup;
    }
public function assignUser($userGroupId, $userId = [])
    {
        $this->groupId = $userGroupId;

        $this->getLogger()->info('Assigning User IDs ' . json_encode($userId) . ' To User Group ID ' . $this->groupId);
        $response = $this->doPost('/group/members/assign/' . $userGroupId, [
            'userId' => $userId
        ]);

        /** @var XiboUserGroup $userGroup */
        $userGroup = $this->hydrate($response);

        return $userGroup;
    }
public function assignUser ( $ userGroupId , $ userId = [ ] ) { $ this -> groupId = $ userGroupId ; $ this -> getLogger ( ) -> info ( 'Assigning User IDs ' . json_encode ( $ userId ) . ' To User Group ID ' . $ this -> groupId ) ; $ response = $ this -> doPost ( '/group/members/assign/' . $ userGroupId , [ 'userId' => $ userId ] ) ; /** @var XiboUserGroup $userGroup */ $ userGroup = $ this -> hydrate ( $ response ) ; return $ userGroup ; }
Assign User to a User Group.

@param int $userGroupId The ID of the user group
@param array|int $userId The ID of the user

@return XiboUserGroup
Assign User to a User Group .