• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/queue/all.php
  • Класс: BitrixImOpenLinesQueueAll
  • Вызов: All::isOperatorAvailable
public function isOperatorAvailable($userId, $currentOperator = 0)
{
	$result = false;

	if($this->isOperatorActive($userId) === true)
	{
		if((int)$userId !== (int)$currentOperator)
		{
			$freeCountChatOperator = ImOpenLinesQueue::getCountFreeSlotOperator($userId, $this->config['ID']);

			if($freeCountChatOperator > 0)
			{
				$result = true;
			}
		}
		else
		{
			$result = true;
		}
	}

	return $result;
}