1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
user_otp.php
См. документацию.
1<?
8
10{
11 protected $internalName = 'UsersTest';
12 protected $tests = [
13 "checkOtp" => [
14 "method" => "checkOtp",
15 ]
16 ];
17
18 protected function checkOtp()
19 {
20 if (\Bitrix\Security\Mfa\Otp::isOtpEnabled())
21 {
22 $ids = [];
23
24 $dbUser = $this->getAdminUserList();
25 while ($user = $dbUser->fetch())
26 {
27 if ($user && (int)$user['ID'] > 0)
28 {
29 $userInfo = \Bitrix\Security\Mfa\Otp::getByUser($user['ID']);
30 if (!$userInfo->isActivated())
31 {
32 $ids[] = $user['ID'];
33 }
34 }
35 }
36
37 if (count($ids))
38 {
40 'SECURITY_SITE_CHECKER_ADMIN_OTP_NOT_USED',
42 parent::formatRecommendation($ids)
43 );
44 }
45 }
46 else
47 {
48 $this->addUnformattedDetailError('SECURITY_SITE_CHECKER_OTP_NOT_USED', CSecurityCriticalLevel::MIDDLE);
49 }
50 }
51
52}
static getByUser($userId)
Определения otp.php:87
addUnformattedDetailError($baseMessageKey, $critical, $additionalInfo="")
Определения base_test.php:283
const MIDDLE
Определения critical_level.php:16
checkOtp()
Определения user_otp.php:18
$tests
Определения user_otp.php:12
$internalName
Определения user_otp.php:11
Определения user.php:15
static getAdminUserList($limit=0, $minId=0)
Определения user.php:214
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936