Documentation

Add

int
CSaleOrderUserProps::Add(
 array arFields
);

The method Add creates a new customer profile given the supplied parameters.

Parameters

ParameterDescription
arFields Associated array containing parameters of the new 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 new profile on success or false otherwise.

Example


<?
$arFields = array(
   "NAME" => "Profile 1",
   "USER_ID" => $USER->GetID(),
   "PERSON_TYPE_ID" => 2
);
$USER_PROPS_ID = CSaleOrderUserProps::Add($arFields);
?>
© «Bitrix24», 2001-2024
Up