Documentation

CForumNew::CanUserUpdateForum

bool
CanUserUpdateForum(
 int ID,
 array arUserGroups,
 int iUserID
);

The method CanUserUpdateForum thoroughly checks whether a specified user who is a member of a specified group can modify a specified forum.

Parameters

ParameterDescription
ID The ID of the forum that the user wants to modify.
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 modify a forum, or false otherwise.

See Also

  • CForumNew::CanUserAddForum
  • CForumNew::CanUserDeleteForum

    Example


    
    <?
    if (CForumNew::CanUserUpdateForum($ID, 
                                      $USER->GetUserGroupArray(),
                                      $USER->GetID()))
    {
    	echo "You can modify this forum!";
    }
    ?>
  • © «Bitrix24», 2001-2024
    Up