Bitrix Site Manager

CGroup::Update

bool
CGroup::Update(
 int id,
 array fields
)

The method Update modifies the group defined by the ID. Returns "true" on success. In case of error the method will return false, and the LAST_ERROR property will contain the error description.

Parameters

ParameterDescription
id the ID of the updated record.
fields An array of the fields values in the format array("field"=>"value" [, ...]).

See Also

Example



<?
$group = new CGroup;
$arFields = Array(
  "ACTIVE"       => "Y",
  "C_SORT"       => 100,
  "NAME"         => "Name of the group",
  "DESCRIPTION"  => "Description of the group",
  "USER_ID"      => array(128, 134)
  );
$group->Update($GROUP_ID, $arFields);
if (strlen($group->LAST_ERROR)>0) ShowError($group->LAST_ERROR);
?>