1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
userauthaction.php
См. документацию.
1<?php
8namespace Bitrix\Main;
9
10use Bitrix\Main\ORM\Data;
11
28class UserAuthActionTable extends Entity\DataManager
29{
30 use Data\Internal\DeleteByFilterTrait;
31
32 const PRIORITY_HIGH = 100;
33 const PRIORITY_LOW = 200;
34
35 const ACTION_LOGOUT = 'logout';
36 const ACTION_UPDATE = 'update';
37
38 public static function getTableName()
39 {
40 return 'b_user_auth_action';
41 }
42
43 public static function getMap()
44 {
45 return array(
46 'ID' => array(
47 'data_type' => 'integer',
48 'primary' => true,
49 'autocomplete' => true,
50 ),
51 'USER_ID' => array(
52 'data_type' => 'integer'
53 ),
54 'PRIORITY' => array(
55 'data_type' => 'integer'
56 ),
57 'ACTION' => array(
58 'data_type' => 'string'
59 ),
60 'ACTION_DATE' => array(
61 'data_type' => 'datetime'
62 ),
63 'APPLICATION_ID' => array(
64 'data_type' => 'string'
65 ),
66 );
67 }
68
75 public static function addLogoutAction($userId, $applicationId = null)
76 {
77 return static::add(array(
78 'USER_ID' => $userId,
79 'PRIORITY' => self::PRIORITY_HIGH,
80 'ACTION' => self::ACTION_LOGOUT,
81 'ACTION_DATE' => new Type\DateTime(),
82 'APPLICATION_ID' => $applicationId,
83 ));
84 }
85
91 public static function addUpdateAction($userId, Type\DateTime $date = null)
92 {
93 if($date === null)
94 {
95 $date = new Type\DateTime();
96 }
97
98 return static::add(array(
99 'USER_ID' => $userId,
100 'PRIORITY' => self::PRIORITY_LOW,
101 'ACTION' => self::ACTION_UPDATE,
102 'ACTION_DATE' => $date,
103 ));
104 }
105}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
static addUpdateAction($userId, Type\DateTime $date=null)
Определения userauthaction.php:91
static addLogoutAction($userId, $applicationId=null)
Определения userauthaction.php:75
static getTableName()
Определения userauthaction.php:38
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения collection.php:2