Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
user.php
1<?php
2
3namespace Bitrix\Security\Mfa;
4
7
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}
static onAfterDelete(ORM\Event $event)
Definition user.php:97