Add support of user registration rules for email domain / phone country

This commit is contained in:
merelendor 2024-08-20 11:16:41 +03:00
parent 1c29b3aa91
commit d9e5cda0e0

View File

@ -4,6 +4,12 @@ header('Content-Type: application/json; charset=utf-8');
use \Bitrix\Main\Service\GeoIp;
use \Bitrix\Main\Grid\Declension;
use \Bitrix\Highloadblock\HighloadBlockTable as HighloadBT;
use \Bitrix\Main\Context,
\Bitrix\Main\Type\DateTime,
\Bitrix\Main\Loader,
\Bitrix\Iblock;
$httpClient = new \Bitrix\Main\Web\HttpClient();
@ -62,11 +68,6 @@ $secret_crm = "lk_evolution_the_best_leasing_company_of_the_world_sSOvumhogyAtZy
$auth = [];
use Bitrix\Main\Context,
Bitrix\Main\Type\DateTime,
Bitrix\Main\Loader,
Bitrix\Iblock;
include_once($_SERVER['DOCUMENT_ROOT'].'/bitrix/php_interface/classes/tfpdf/tfpdf.php');
class PDF extends tFPDF
@ -870,6 +871,30 @@ switch($PARAM_1)
}
break;
case "rules":
{
if(CModule::IncludeModule('highloadblock'))
{
$hlblock = HighloadBT::getById(HLBLOCK_REGRULES)->fetch();
$entity = HighloadBT::compileEntity(HLBLOCK_REGRULES)->getDataClass();
$rsData = $entity::getList(array(
'select' => array('*'),
));
$response = [];
while($entry = $rsData->fetch())
{
array_push($response, [ "type" => $entry['UF_REGRULES_TYPE'], "value" => $entry['UF_REGRULES_VALUE'] ]);
}
print json_encode($response);
}
die();
}
break;
default:
{
print json_encode([