method public

UserRepositoryInterface::getUserById()

Класс: \Bitrix\Tasks\Internals\Notification\UserRepositoryInterface

Сигнатура

public getUserById(int|null $userId) : User|null

Параметры

$userId int|null

Возвращаемое значение

User|null

Как применяется в UserRepositoryInterface

UserRepositoryInterface::getUserById() — метод интерфейса \Bitrix\Tasks\Internals\Notification\UserRepositoryInterface модуля «Задачи».

Метод объекта: сначала нужен объект, реализующий UserRepositoryInterface.

use Bitrix\Main\Loader;
use Bitrix\Tasks\Internals\Notification\UserRepositoryInterface;

Loader::includeModule('tasks');

/** @var UserRepositoryInterface $object */
$userId = 1;
$result = $object->getUserById($userId);
// $result: User|null

Другие методы UserRepositoryInterface

getUserById() есть и у других классов модуля «Задачи»: UserRepository.

Исходный файл: source/tasks/lib/internals/notification/userrepositoryinterface.php:18

Что будем искать? Например,Продвижение