A
A
Alexander2020-07-16 17:56:12
1C-Bitrix
Alexander, 2020-07-16 17:56:12

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

1 answer(s)
A
Alexey Emelyanov, 2020-07-16
@kikher

/bitrix/php_intarface/init.phpAdd to file

AddEventHandler("main", "OnBeforeUserRegister", "OnBeforeUserRegisterCustom");

function OnBeforeUserRegisterCustom(&$arFields)
{
    //изменяете поля в массиве $arFields
    $arFields['NAME'] = 'TEST';
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question