• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/queue.php
  • Класс: BitrixImOpenLinesQueue
  • Вызов: Queue::isOperatorSingleInLine
static function isOperatorSingleInLine(int $lineId, int $operatorId): bool
{
	if ($lineId > 0)
	{
		$query = new Query(QueueTable::getEntity());
		$query->setSelect(['USER_ID']);
		$query->setFilter(['CONFIG_ID' => $lineId]);
		$query->countTotal(true);
		$count = $query->exec()->getCount();

		if ($count === 1)
		{
			$queue = $query->exec()->fetch();
			if ((int)$queue['USER_ID'] === $operatorId)
			{
				return true;
			}

		}
	}
	return false;
}