• Модуль: pull
  • Путь к файлу: ~/bitrix/modules/pull/lib/event.php
  • Класс: BitrixPullEvent
  • Вызов: Event::getUserIds
static function getUserIds(array $channels)
{
	$result = array_fill_keys($channels, null);
	$orm = BitrixPullModelChannelTable::getList([
		'select' => ['USER_ID', 'CHANNEL_ID', 'USER_ACTIVE' => 'USER.ACTIVE'],
		'filter' => [
			'=CHANNEL_ID' => $channels,
		],
	]);
	while ($row = $orm->fetch())
	{
		if ($row['USER_ID'] > 0 && $row['USER_ACTIVE'] !== 'N')
		{
			$result[$row['CHANNEL_ID']] = $row['USER_ID'];
		}
		else
		{
			unset($result[$row['CHANNEL_ID']]);
		}
	}

	return $result;
}