- Модуль: main
- Путь к файлу: ~/bitrix/modules/main/lib/userphoneauth.php
- Класс: BitrixMainUserPhoneAuthTable
- Вызов: UserPhoneAuthTable::getMap
static function getMap()
{
return array(
new FieldsIntegerField("USER_ID", array(
'primary' => true,
)),
new FieldsStringField("PHONE_NUMBER", array(
'validation' => function() {
return array(
new FieldsValidatorsLengthValidator(1, null, ["MIN" => Loc::getMessage("user_phone_auth_err_number")]),
array(__CLASS__, 'validatePhoneNumber'),
new FieldsValidatorsUniqueValidator(Loc::getMessage("user_phone_auth_err_duplicte")),
);
}
)),
new FieldsSecretField("OTP_SECRET", array(
'crypto_enabled' => static::cryptoEnabled("OTP_SECRET"),
)),
new FieldsIntegerField("ATTEMPTS", array(
"default_value" => 0,
)),
new FieldsBooleanField("CONFIRMED", array(
"values" => array("N", "Y"),
"default_value" => "N",
)),
new FieldsDatetimeField("DATE_SENT"),
(new FieldsRelationsReference(
'USER',
UserTable::class,
Join::on('this.USER_ID', 'ref.ID')
))->configureJoinType('inner'),
);
}