Documentation

Update

int
CSaleOrderUserProps::Update(
 int ID,
 array arFields
);

The method Update replaces the customer profile parameters with the new ones from the supplied array.

Parameters

ParameterDescription
ID The customer profile ID.
arFields Associated array containing new parameters of the profile whose keys are the order parameter names, and values are the parameter values.

The following values are possible:
  • NAME - user profile name;
  • USER_ID - the ID of a user for whom the profile is to be created;
  • PERSON_TYPE_ID - the payer type ID;
  • DATE_UPDATE - the date of the last modification.

Returned values

Returns the ID of the updated profile on success or false otherwise.

Example


<?
// Change the profile name
$arFields = array(
   "NAME" => "Profile 24"
);
if (!CSaleOrderUserProps::Update(258, $arFields))
   echo "error updating profile";
?>
© «Bitrix24», 2001-2024
Up