public function addUser($id, $userId)
    {
        $xml = new \SimpleXMLElement('<?xml version="1.0"?><user_id>'.$userId.'</user_id>');

        return $this->post('/groups/'.$id.'/users.xml', $xml->asXML());
    }
public function addUser($id, $userId)
    {
        $xml = new \SimpleXMLElement('<?xml version="1.0"?><user_id>'.$userId.'</user_id>');

        return $this->post('/groups/'.$id.'/users.xml', $xml->asXML());
    }
public function addUser ( $ id , $ userId ) { $ xml = new \ SimpleXMLElement ( '<?xml version="1.0"?><user_id>' . $ userId . '</user_id>' ) ; return $ this -> post ( '/groups/' . $ id . '/users.xml' , $ xml -> asXML ( ) ) ; }
Adds an existing user to a group.

@see http://www.redmine.org/projects/redmine/wiki/Rest_Groups#POST-2

@param int $id     id of the group
@param int $userId id of the user

@return string
Adds an existing user to a group .