bool
CanUserAddMessage(
int TID,
array arUserGroups,
int iUserID
);
The method CanUserAddMessage thoroughly checks whether a specified
user who is a member of a specified group can add a new message into a specified
topic.
Parameters
Parameter
Description
TID
The ID of the topic to which a user wants to add a message.
arUserGroups
Array of groups whose member this user is. Array of groups of the
current user is returned by $USER->GetUserGroupArray().
iUserID
The user ID. The current user ID is returned by $USER->GetID().
Return Values
Returns true if the user has all the permissions required to add a message, or false
otherwise.