Bitrix Site Manager

CForumNew::CanUserAddForum

bool
CanUserAddForum(
 array arUserGroups,
 int iUserID
);

The method CanUserAddForum thoroughly checks whether a specified user who is a member of a specified group can add a new forum.

Parameters

ParameterDescription
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 permissions required to add a message, or false otherwise.

See Also

  • CForumNew::CanUserUpdateForum
  • CForumNew::CanUserDeleteForum