S
S
sergeyviktorovich2021-04-14 13:19:24
1C-Bitrix
sergeyviktorovich, 2021-04-14 13:19:24

How in the user field, for example, the result, to write down the value after certain actions?

I created a result field for users in additional roles, how to enter a value from a php file into it? I plan to send the result to the file via ajax?
something didn't work

$user = new CUser;
$fields = Array( 
"UF_RESULT" => '100', 
); 
$user->Update($ID, $fields);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gritsuk, 2021-04-14
@winer

Read what you need from the file, and use the CUser::Update method to write the result to the property you need

$user = new CUser;
$fields = Array( 
"UF_PROPERTY_CODE" => "value", 
); 
$user->Update($ID, $fields);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question