• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/notification/userrepository.php
  • Класс: BitrixTasksInternalsNotificationUserRepository
  • Вызов: UserRepository::getRecepients
public function getRecepients(TaskObject $task, User $sender, array $optional = []): array
{
	$recepients = [];

	foreach ($this->getParticipants($task, $optional) as $id)
	{
		if ($id === null || $this->ignoreRecepient((int)$id, $optional))
		{
			continue;
		}

		if ((int)$id === $sender->getId() && !$this->isSpawnedByAgent($optional))
		{
			continue;
		}

		$recepient = $this->getUserById((int)$id);
		if ($recepient)
		{
			$recepients[] = $recepient;
		}
	}

	return $recepients;
}