It is necessary to leave in the registration form only the Email and phone fields, the login field should be removed, the user's login should be formed on the basis of his Email.

How can I implement user registration in Bitrix, so that when registering, the user does not fill out the login field in the registration form, and the login is based on Email? For example, if the user Email - max88@gmail.com then the login should be the same - max88@gmail.com

  • 2
    using the registration event handler in the init.php file or customizing the registration component. - Nikolaj Sarry

1 answer 1

Login is a required field, without crutches is unlikely to work.

The algorithm may be as follows:

1) Customize the registration template - hide (style = "display: none;") input with login, fill the input with a stub - a randomly generated string.

2) we create an event handler in init.php for the OnBeforeUserRegister event, in which we replace the login value with the user-specified email.