1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
UserAccessChecker.php
См. документацию.
1<?php
2
3declare(strict_types=1);
4
6
8{
9 public function __construct(private readonly int $userId)
10 {
11 }
12
13 public function canAuthorize(): bool
14 {
15 $user = \CUser::GetByID($this->userId)->fetch();
16
17 if (
18 !empty($user['CONFIRM_CODE'])
19 || (
20 !in_array($user['EXTERNAL_AUTH_ID'], \Bitrix\Main\UserTable::getExternalUserTypes(), true)
21 && (empty($user['LAST_LOGIN']) || empty($user['LAST_ACTIVITY_DATE']))
22 )
23 )
24 {
25 return false;
26 }
27
28 return (bool)$user;
29 }
30}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
__construct(private readonly int $userId)
Определения UserAccessChecker.php:9
$user
Определения mysql_to_pgsql.php:33