Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
otpevents.php
1
<?php
2
namespace
Bitrix\Security\Mfa
;
3
4
use
Bitrix\Main\Type
;
5
6
class
OtpEvents
7
{
13
public
static
function
onRecheckDeactivate
()
14
{
15
$users =
UserTable::query
()
16
->addFilter(
'<DEACTIVATE_UNTIL'
,
new
Type
\
DateTime
)
17
->addFilter(
'=ACTIVE'
,
'N'
)
18
->addSelect(
'USER_ID'
)
19
->addSelect(
'SKIP_MANDATORY'
)
20
->addSelect(
'SECRET'
)
21
->setLimit(100)
22
->exec()
23
->fetchAll();
24
25
foreach
($users as $user)
26
{
27
if
($user[
'SKIP_MANDATORY'
] ===
'Y'
&& !$user[
'SECRET'
])
28
UserTable::update
($user[
'USER_ID'
], array(
'SKIP_MANDATORY'
=>
'N'
,
'DEACTIVATE_UNTIL'
=>
null
));
29
else
30
UserTable::update
($user[
'USER_ID'
], array(
'ACTIVE'
=>
'Y'
,
'SKIP_MANDATORY'
=>
'N'
,
'DEACTIVATE_UNTIL'
=>
null
));
31
}
32
33
return
sprintf(
'%s();'
, __METHOD__);
34
}
35
}
Bitrix\Main\ORM\Data\DataManager\query
static query()
Definition
datamanager.php:559
Bitrix\Main\ORM\Data\DataManager\update
static update($primary, array $data)
Definition
datamanager.php:1246
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Security\Mfa\OtpEvents
Definition
otpevents.php:7
Bitrix\Security\Mfa\OtpEvents\onRecheckDeactivate
static onRecheckDeactivate()
Definition
otpevents.php:13
Bitrix\Main\Type
Definition
collection.php:2
Bitrix\Security\Mfa
Definition
otp.php:3
modules
security
lib
mfa
otpevents.php
Создано системой
1.10.0