API Reference

Events.isUserInEvent

Checks whether a user is in an event.

A simple boolean will be returned, true if the user is in the event, false otherwise.

If includeChildren is true then this function will return true if the user is in the event specified or any of its descendants (its descendants can be both groups and events).


Syntax

int events.isUserInEvent ( int eventID, int userID, bool includeChildren = false )

Arguments

NameTypeRequiredDefault valueDescription
eventIDintRequirednoneThe event ID to check if the user is a member of.
userIDintRequirednoneThe user ID that we are checking to see if they are in the event.
includeChildrenboolOptionalfalseBy default this is false. If true, checks child events as well.

Response

The response will contain 1 if the user is in the specified event ID.

NameTypeDescriptionSuccessERROR
resultINTIf the user is in the event a response of 1 will be returned. If the user is not a member of the event the response will be empty.<result>1</result><result/>

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/events/isUserInEvent?eventId=[EVENT_ID]&userID=[USER_ID]&includeChildren=true
<?xml version="1.0" encoding="UTF-8"?>
<result>1</result>
Sample JSON Response
{
    "status": true,
    "result": 1
}

Code examples

0 comments

Be the first to comment on isUserInEvent.

Add a Comment

  • captcha