API Reference


This function marks a particular user as offensive.

Note: A user can report a user as offensive once.

You can pass various optional parameters to this function, including the id of the user who reported the user as offensive and the reason why the user was reported offensive. If you wish to send an email to a particular person upon the use of this function, then you have to set the following parameters: "templateid" and "to". The "templateid" defines the template to be used for the email, and "to" defines the recipient's email

The variables available in the email are: "user_id", "vhost", "reportedby", "date" and "reason". Please refer to the table below for more information.


void users.reportOffensive ( int vhost, mixed uid, array parameters = array() )


NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe vhost ID of the user you want to log as offensive.
parametersarrayOptionalarray()These are various fields that are completely optional.
Sample values are:

For more information please refer to the "Parameters" table below.


The optional parameters that can be passed as an array.

reportedbyINTThis is the id of the user who is reporting the user as being offensive
reasonSTRINGThis is the reason why the user is flagging this user as offensive.
Note: This value has a maximum length of 255 characters.
templateidINTSet templateid to send an email to a flagged user. The recipient's email address is set in the "to" parameter.
Note: When "templateid" is set, you need to define tempate variables for the email, as displayed in the "Email Template Parameters" table below.
toSTRINGThe e-mail address that the report is going to.

Email Template Parameters

The variables that are available within the email template, for the email that is sent when the parameter templateid is set.

user_idINTThe id of the user reported as offensive
vhostINTThe id of the project that contains the user reported as offensive
dateDATETIMEThe date and time that the user was reported as offensive
uidINTThe id of the user who reported the user as offensive
reasonSTRINGThe reason why the user was reported as offensive (if provided by the user)

Sample Response

Code examples


Be the first to comment on reportOffensive.

Add a Comment

  • captcha