1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
SettingsCheckAccess.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\V2\Controller\Filter;
4
5use Bitrix\Im\V2\Entity\User\User;
6use Bitrix\Im\V2\Settings\SettingsError;
7use Bitrix\Main\Engine\ActionFilter\Base;
8use Bitrix\Main\Event;
9use Bitrix\Main\EventResult;
10
12{
13 public function onBeforeAction(Event $event)
14 {
15 $userId = (int)$this->getAction()->getArguments()['userId'];
16 $currentUserId = User::getCurrent()->getId();
17 if (
18 $userId !== $currentUserId
19 && !User::getCurrent()->isAdmin()
20 )
21 {
23
24 return new EventResult(EventResult::ERROR, null, null, $this);
25 }
26
27 return null;
28 }
29}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
addError(Error $error)
Определения base.php:80
$event
Определения prolog_after.php:141