1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
user.php
См. документацию.
1<?php
3
5
6class User
7{
8 public static function getId()
9 {
10 $user = static::getUser();
11 return $user? (int)$user->getId() : 0;
12 }
13
15 public static function getUser()
16 {
17 return isset($GLOBALS['USER']) && $GLOBALS['USER'] instanceof \CUser ? $GLOBALS['USER'] : null;
18 }
19
20 public static function isAdmin()
21 {
22 $user = static::getUser();
23
24 if ($user && $user->isAuthorized())
25 {
26 return (
27 $user->IsAdmin()
28 ||
29 Loader::includeModule('bitrix24') && \CBitrix24::isPortalAdmin($user->getId())
30 );
31 }
32
33 return false;
34 }
35}
Определения loader.php:13
static isAdmin()
Определения user.php:20
static getId()
Определения user.php:8
static getUser()
Определения user.php:15
$user
Определения mysql_to_pgsql.php:33
$GLOBALS['____1690880296']
Определения license.php:1