Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
user.php
1
<?php
2
3
namespace
Bitrix\Security\Mfa
;
4
5
use
Bitrix\Main\ORM
;
6
use
Bitrix\Main\Type
;
7
24
class
UserTable
extends
ORM\Data\DataManager
25
{
31
public
static
function
getTableName
()
32
{
33
return
'b_sec_user'
;
34
}
35
41
public
static
function
getMap
()
42
{
43
return
array(
44
'USER_ID'
=> array(
45
'data_type'
=>
'integer'
,
46
'primary'
=>
true
47
),
48
'USER'
=> array(
49
'data_type'
=>
'\Bitrix\Main\User'
,
50
'reference'
=> array(
'=this.USER_ID'
=>
'ref.ID'
),
51
'join_type'
=>
'INNER'
,
52
),
53
'ACTIVE'
=> array(
54
'data_type'
=>
'boolean'
,
55
'values'
=> array(
'N'
,
'Y'
),
56
'default'
=>
'N'
57
),
58
'SECRET'
=> array(
59
'data_type'
=>
'string'
,
60
'format'
=>
'#^[a-z0-9]{0,64}$#iD'
61
),
62
'PARAMS'
=> array(
63
'data_type'
=>
'text'
64
),
65
'TYPE'
=> array(
66
'data_type'
=>
'string'
,
67
'values'
=> array(Otp::TYPE_TOTP, Otp::TYPE_HOTP),
68
'default'
=> Otp::TYPE_DEFAULT
69
),
70
'ATTEMPTS'
=> array(
71
'data_type'
=>
'integer'
,
72
'default'
=> 0
73
),
74
'INITIAL_DATE'
=> array(
75
'data_type'
=>
'datetime'
,
76
'default'
=>
new
Type
\
DateTime
77
),
78
'SKIP_MANDATORY'
=> array(
79
'data_type'
=>
'boolean'
,
80
'values'
=> array(
'N'
,
'Y'
),
81
'default'
=>
'N'
82
),
83
'DEACTIVATE_UNTIL'
=> array(
84
'data_type'
=>
'datetime'
85
),
86
(
new
ORM\Fields\
ArrayField
(
'INIT_PARAMS'
)),
87
);
88
}
89
97
public
static
function
onAfterDelete
(ORM\
Event
$event)
98
{
99
$primary = $event->getParameter(
'primary'
);
100
RecoveryCodesTable::clearByUser($primary[
'USER_ID'
]);
101
}
102
}
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Event
Definition
event.php:16
Bitrix\Main\ORM\Fields\ArrayField
Definition
arrayfield.php:19
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Main\UserTable
Definition
user.php:46
Bitrix\Security\Mfa\UserTable\getMap
static getMap()
Definition
user.php:41
Bitrix\Security\Mfa\UserTable\onAfterDelete
static onAfterDelete(ORM\Event $event)
Definition
user.php:97
Bitrix\Security\Mfa\UserTable\getTableName
static getTableName()
Definition
user.php:31
Bitrix\Main\ORM
Bitrix\Main\Type
Definition
collection.php:2
Bitrix\Security\Mfa
Definition
otp.php:3
modules
security
lib
mfa
user.php
Создано системой
1.10.0