Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
userauthcodetable.php
1
<?php
9
namespace
Bitrix\Main\Authentication\Internal
;
10
11
use
Bitrix\Main
;
12
use
Bitrix\Main\ORM\Query\Join
;
13
use
Bitrix\Main\ORM\Data
;
14
use
Bitrix\Main\ORM\Fields
;
15
32
class
UserAuthCodeTable
extends
Data\DataManager
33
{
34
use Data\Internal\DeleteByFilterTrait;
35
36
const
TYPE_EMAIL
=
'email'
;
37
38
public
static
function
getTableName
()
39
{
40
return
'b_user_auth_code'
;
41
}
42
43
public
static
function
getMap
()
44
{
45
return
array(
46
new
Fields\
IntegerField
(
"USER_ID"
, array(
47
'primary'
=>
true
,
48
'validation'
=>
function
()
49
{
50
return
[
51
new
Fields\Validators\ForeignValidator
(Main\
UserTable::getEntity
()->getField(
'ID'
)),
52
];
53
}
54
)),
55
56
new
Fields\StringField(
"CODE_TYPE"
, array(
57
'default_value'
=> self::TYPE_EMAIL,
58
'primary'
=>
true
,
59
)),
60
61
new
Fields\SecretField(
"OTP_SECRET"
, array(
62
'crypto_enabled'
=> static::cryptoEnabled(
"OTP_SECRET"
),
63
)),
64
65
new
Fields\IntegerField(
"ATTEMPTS"
, array(
66
"default_value"
=> 0,
67
)),
68
69
new
Fields\DatetimeField(
"DATE_SENT"
),
70
71
new
Fields\DatetimeField(
"DATE_RESENT"
),
72
73
(
new
Fields\Relations\Reference
(
74
'USER'
,
75
Main\UserTable::class,
76
Join::on(
'this.USER_ID'
,
'ref.ID'
)
77
))->configureJoinType(
'inner'
),
78
);
79
}
80
}
Bitrix\Main\Authentication\Internal\UserAuthCodeTable
Definition
userauthcodetable.php:33
Bitrix\Main\Authentication\Internal\UserAuthCodeTable\getMap
static getMap()
Definition
userauthcodetable.php:43
Bitrix\Main\Authentication\Internal\UserAuthCodeTable\TYPE_EMAIL
const TYPE_EMAIL
Definition
userauthcodetable.php:36
Bitrix\Main\Authentication\Internal\UserAuthCodeTable\getTableName
static getTableName()
Definition
userauthcodetable.php:38
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Data\DataManager\getEntity
static getEntity()
Definition
datamanager.php:78
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\Relations\Reference
Definition
reference.php:26
Bitrix\Main\ORM\Fields\Validators\ForeignValidator
Definition
foreignvalidator.php:24
Bitrix\Main\ORM\Query\Join
Definition
join.php:19
Bitrix\Main\Authentication\Internal
Definition
groupsubordinatetable.php:10
Bitrix\Main\ORM\Data
Definition
addresult.php:9
Bitrix\Main\ORM\Fields
Definition
arrayfield.php:9
Bitrix\Main
modules
main
lib
authentication
internal
userauthcodetable.php
Создано системой
1.10.0