Bitrix Site Manager

CForumGroup::Update

int
Update(
 int ID,
 array arFields
);

The method Update modifies the parameters of the existing group specified by the ID. Returns the ID of the modified group.

Parameters

ParameterDescription
ID The ID of the group whose parameters are to be modified.
arFields An array of the format Array(field1=>value1[, field2=>value2 [, ..]]), where:
  • field - field name;
  • value - field value.
The fields are listed in the List of group fields. The "LANG" special field may be set to an array of arrays containing the fields with language parameters of a group. These arrays have the similar structure.

Return Values

Returns the ID of the modified group on success, or false otherwise.

See Also

  • Fields of a group

    Example


    
    <?
    $arFields = array("SORT" => $SORT);
    $arSysLangs = array("fr", "en");
    for ($i = 0; $i<count($arSysLangs); $i++)
    {
      $arFields["LANG"][] = array(
        "LID" => $arSysLangs[$i],
        "NAME" => ${"NAME_".$arSysLangs[$i]},
        "DESCRIPTION" => ${"DESCRIPTION_".$arSysLangs[$i]}
        );
    }
    $ID1 = CForumGroup::Update($ID, $arFields);
    if (IntVal($ID1)<=0)
      echo "Error!";
    ?>