Answer the question
In order to leave comments, you need to log in
Why, when registering a user via API in Bitrix, the error “Jur. Faces?
It was necessary to complete the registration form on the Bitrix site, I wrote the code
global $USER;
$arFields = Array(
"EMAIL"=>$email,
"LOGIN"=>$login,
"ACTIVE"=>"Y",//Делаем пользователя активным
"PASSWORD"=>$pass,
"CONFIRM_PASSWORD"=>$pass2,
"UF_INN_ID"=>$inn,// Добавляем пользовательское поле(они всегда начинаются с UF_)
"UF_BU_ST"=>"N",
"UF_F_NAME"=>"Не указано"
);
$id = $USER->Add($arFields);
var_dump($arFields);var_dump($id);echo $USER->LAST_ERROR;
Answer the question
In order to leave comments, you need to log in
The simplest thing is to look for the text of this error throughout the code.
If you don’t have a project locally, don’t have code in git, don’t have access to the server console (to search there using grep), then unwind the chain from the file /local/php_interface/init.php or /bitrix/php_interface/init.php (depending on what is).
You need an OnBeforeUserAdd handler, look for it.
If not there, look at the installed custom modules, look for the same event handler.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question