1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
currentuser.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main\Engine;
4
5
use CUser;
6
7
final
class
CurrentUser
8
{
10
private
$cuser;
11
16
protected
function
__construct
()
17
{
18
}
19
24
public
static
function
className
(): string
25
{
26
return
self::class;
27
}
28
33
public
static
function
get
(): self
34
{
35
global
$USER
;
36
37
$self =
new
self
();
38
if
(
$USER
instanceof \CUser)
39
{
40
$self->cuser =
$USER
;
41
}
42
43
return
$self;
44
}
45
49
public
function
getId
()
50
{
51
return
$this->cuser?->getId();
52
}
53
57
public
function
getLogin
()
58
{
59
return
$this->cuser?->getLogin();
60
}
61
65
public
function
getEmail
()
66
{
67
return
$this->cuser?->getEmail();
68
}
69
73
public
function
getFullName
()
74
{
75
return
$this->cuser?->getFullName();
76
}
77
81
public
function
getFirstName
()
82
{
83
return
$this->cuser?->getFirstName();
84
}
85
89
public
function
getLastName
()
90
{
91
return
$this->cuser?->getLastName();
92
}
93
97
public
function
getSecondName
()
98
{
99
return
$this->cuser?->getSecondName();
100
}
101
105
public
function
getUserGroups
():
array
106
{
107
$groups
= $this->cuser?->getUserGroupArray();
108
return
is_array(
$groups
) ?
$groups
: [];
109
}
110
114
public
function
getFormattedName
(): string
115
{
116
return
(
string
)$this->cuser?->getFormattedName(
false
,
false
);
117
}
118
123
public
function
canDoOperation
($operationName): bool
124
{
125
return
(
bool
)$this->cuser?->canDoOperation($operationName);
126
}
127
131
public
function
isAdmin
(): bool
132
{
133
return
(
bool
)$this->cuser?->isAdmin();
134
}
135
}
Bitrix\Main\Engine\CurrentUser
Определения
currentuser.php:8
Bitrix\Main\Engine\CurrentUser\getEmail
getEmail()
Определения
currentuser.php:65
Bitrix\Main\Engine\CurrentUser\__construct
__construct()
Определения
currentuser.php:16
Bitrix\Main\Engine\CurrentUser\getId
getId()
Определения
currentuser.php:49
Bitrix\Main\Engine\CurrentUser\getFullName
getFullName()
Определения
currentuser.php:73
Bitrix\Main\Engine\CurrentUser\canDoOperation
canDoOperation($operationName)
Определения
currentuser.php:123
Bitrix\Main\Engine\CurrentUser\getUserGroups
getUserGroups()
Определения
currentuser.php:105
Bitrix\Main\Engine\CurrentUser\getSecondName
getSecondName()
Определения
currentuser.php:97
Bitrix\Main\Engine\CurrentUser\getFormattedName
getFormattedName()
Определения
currentuser.php:114
Bitrix\Main\Engine\CurrentUser\getLastName
getLastName()
Определения
currentuser.php:89
Bitrix\Main\Engine\CurrentUser\getLogin
getLogin()
Определения
currentuser.php:57
Bitrix\Main\Engine\CurrentUser\isAdmin
isAdmin()
Определения
currentuser.php:131
Bitrix\Main\Engine\CurrentUser\getFirstName
getFirstName()
Определения
currentuser.php:81
Bitrix\Main\Engine\CurrentUser\className
static className()
Определения
currentuser.php:24
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$USER
global $USER
Определения
csv_new_run.php:40
$groups
$groups
Определения
options.php:30
bitrix
modules
main
lib
engine
currentuser.php
Создано системой
1.14.0