1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
user.php
См. документацию.
1<?php
2namespace Bitrix\Landing\Controller;
3
4use Bitrix\Landing\PublicActionResult;
5use Bitrix\Main\Engine\ActionFilter\Authentication;
6use Bitrix\Main\Engine\Controller;
7use Bitrix\Main\UserTable;
8
9class User extends Controller
10{
11 public function getDefaultPreFilters(): array
12 {
13 return [
14 new Authentication(),
16 ];
17 }
18
24 public static function getUserNameByIdAction(int $userId): string
25 {
26 $res = UserTable::getList([
27 'select' => [
28 'NAME',
29 'LAST_NAME'
30 ],
31 'filter' => [
32 'ID' => $userId
33 ]
34 ]);
35 $row = $res->fetch();
37 $result->setResult([
38 'NAME' => \CUser::formatName(
39 \CSite::getNameFormat(false),
40 $row, true, false
41 )
42 ]);
43 return $result->getResult()['NAME'];
44 }
45
51 public static function getUsersInfoAction(array $setUserId): array
52 {
53 $res = UserTable::getList([
54 'select' => [
55 'NAME',
56 'LAST_NAME',
57 'PERSONAL_PHOTO',
58 ],
59 'filter' => [
60 'ID' => $setUserId
61 ]
62 ]);
63 $setName = [];
64 $personalPhoto = [];
65
66 while ($row = $res->fetch())
67 {
69 $name->setResult([
70 'NAME' => \CUser::formatName(
71 \CSite::getNameFormat(false),
72 $row, true, false
73 )
74 ]);
75 $setName[] = $name->getResult()['NAME'];
76 if ($row['PERSONAL_PHOTO'])
77 {
78 $personalPhoto[] = $row['PERSONAL_PHOTO'];
79 }
80 else
81 {
82 $personalPhoto[] = null;
83 }
84 }
85
86 $data = [];
87 $data['name'] = $setName;
88 $data['personalPhoto'] = $personalPhoto;
89
90 return $data;
91 }
92}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
getDefaultPreFilters()
Определения user.php:11
static getUserNameByIdAction(int $userId)
Определения user.php:24
static getUsersInfoAction(array $setUserId)
Определения user.php:51
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
$name
Определения menu_edit.php:35