43 $currentUser = CurrentUser::get();
44 $isBitrix24Cloud = Loader::includeModule(
'bitrix24');
45 $application = \Bitrix\Main\HttpApplication::getInstance();
46 $host = self::getHostName();
47 $userId = $currentUser->getId();
49 'url' => $currentUrl ??
'https://' . $_SERVER[
'HTTP_HOST'] . $APPLICATION->GetCurPageParam(),
50 'is_admin' => ($isBitrix24Cloud && \CBitrix24::isPortalAdmin($userId))
51 || (!$isBitrix24Cloud && $currentUser->isAdmin()) ? 1 : 0,
52 'tariff' => Option::get(
'main',
'~controller_group_name',
''),
53 'is_cloud' => $isBitrix24Cloud ?
'1' :
'0',
54 'portal_date_register' => $isBitrix24Cloud ? Option::get(
'main',
'~controller_date_create',
'') :
'',
56 'languageId' => LANGUAGE_ID,
58 'user_email' => $currentUser->getEmail(),
59 'user_name' => Encoding::convertEncoding($currentUser->getFirstName(), SITE_CHARSET,
'utf-8'),
60 'user_last_name' => Encoding::convertEncoding($currentUser->getLastName(), SITE_CHARSET,
'utf-8'),
63 if (Loader::includeModule(
'intranet'))
65 $parameters[
'user_date_register'] = \Bitrix\Intranet\CurrentUser::get()->getDateRegister()?->getTimestamp();
68 if (Loader::includeModule(
'imbot'))
70 $parameters[
'support_partner_code'] = Partner24::getBotCode();
71 $partnerName = Encoding::convertEncoding(Partner24::getPartnerName(), SITE_CHARSET,
'utf-8');
72 $parameters[
'support_partner_name'] = $partnerName;
76 class_exists(
'\\Bitrix\\ImBot\\Bot\\Support24')
77 && (Support24::getSupportLevel() === Network::SUPPORT_LEVEL_PAID)
78 && Support24::isEnabled()
81 $supportBotId = (int)Support24::getBotId();
84 method_exists(
'\\Bitrix\\ImBot\\Bot\\SupportBox',
'isEnabled')
85 && SupportBox::isEnabled()
88 $supportBotId = SupportBox::getBotId();
91 $parameters[
'support_bot'] = $supportBotId;
94 if (!$isBitrix24Cloud)
96 $parameters[
'head'] = md5(
"BITRIX" . $application->getLicense()->getKey() .
'LICENCE');
97 $parameters[
'key'] = md5($host . $userId . $parameters[
'head']);
101 $parameters[
'key'] = \CBitrix24::requestSign($host . $userId);