/** This creates a request for access to a channel * * @param int $channelid the nodeid of the channel to which access is requested. * @param string $requestType the type of request. See vB_Api_Node::REQUEST_<> constants * @param mixed $recipient the userid/username of the member who will get the request * @param string $recipientname (Optional) the username of the member who will get the request * * @return mixed If it is 1 or true, then it means that the follow request was successful. * If it is integer and greater than 1, then the request is pending. **/ public function requestChannel($channelid, $requestType, $recipient = 0, $recipientname = null) { if (!vB::getUserContext()->getChannelPermission('forumpermissions', 'canjoin', $channelid) or !vB::getUserContext()->getChannelPermission('forumpermissions', 'canview', $channelid)) { throw new vB_Exception_Api('no_permission'); } return $this->library->requestChannel($channelid, $requestType, $recipient, $recipientname, vB::getUserContext()->getChannelPermission('moderatorpermissions', 'canaddowners', $channelid)); }