T
T
TechNOIR2020-09-28 20:16:15
1C-Bitrix
TechNOIR, 2020-09-28 20:16:15

1c-Bitrix. Registration does not work. Writes that the required fields are not filled. How to fix?

Good afternoon.

On the registration page, I fill in all the required fields. I click OK, I get a bunch of messages that the required fields are not filled in (although they were filled in) and the registration fails.
What could be the problem?

The code:

if($_REQUEST["forgot_password"] == 'yes'){
      $APPLICATION->IncludeComponent(
        "bitrix:system.auth.forgotpasswd",
        ".default",
        Array()
      );
    }else {
      $APPLICATION->IncludeComponent("bitrix:main.register", "mycustom", Array(
        "USER_PROPERTY_NAME" => "", //Название блока пользовательских свойств
        "SHOW_FIELDS" => array( //Поля, которые показывать в форме
          "EMAIL",
          "LOGIN",
          "PASSWORD",
          "CONFIRM_PASSWORD",
          "LAST_NAME",
          "NAME",
          "SECOND_NAME",
          "COMPANY"
        ),
        "REQUIRED_FIELDS" => array( //Поля, обязательные для заполнения
          "EMAIL",
          "LOGIN",
          "PASSWORD",
          "CONFIRM_PASSWORD",
          "LAST_NAME",
          "NAME",
          "SECOND_NAME",
          "COMPANY"
        ),
        "AUTH" => "Y", //Автоматически авторизовать пользователей
        "USE_BACKURL" => "Y", //Отправлять пользователя по обратной ссылке, если она есть
        "SUCCESS_PAGE" => "", //Страница окончания регистрации
        "SET_TITLE" => "N", //Устанавливать заголовок страницы
        "USER_PROPERTY" => array( //Показывать доп. свойства
          "UF_WHO",
          "UF_ADD_INFO"
        ),
      ),
        false
      );
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Technique102, 2020-09-28
@Technique102

1. Check if the user has required 'custom properties'
2. Check the login event, there might be a check. Usually in init.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question