Answer the question
In order to leave comments, you need to log in
How to change Bitrix registration form data after submitting?
Good afternoon!
There is a standard Bitrix component for user registration.
It contains the username, username, password and password confirmation.
It is necessary that after pressing the submit button, the system changes the field values.
As I understand it, this can be done with some kind of event handlers, I don’t understand how and how. It seems that it did not work through component_epilog.php and result_modifier.php.
How can I change the username for example?
Answer the question
In order to leave comments, you need to log in
/bitrix/php_intarface/init.php
Add to
file
AddEventHandler("main", "OnBeforeUserRegister", "OnBeforeUserRegisterCustom");
function OnBeforeUserRegisterCustom(&$arFields)
{
//изменяете поля в массиве $arFields
$arFields['NAME'] = 'TEST';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question