• Модуль: imbot
  • Путь к файлу: ~/bitrix/modules/imbot/lib/bot/support24.php
  • Класс: BitrixImBotBotSupport24
  • Вызов: Support24::isActivePaidSupportForUser
static function isActivePaidSupportForUser($userId)
{
	if (!self::getBotId())
	{
		return false;
	}

	if (self::getSupportLevel() != self::SUPPORT_LEVEL_PAID)
	{
		return false;
	}

	if (self::isActivePartnerSupport() && !self::isUserIntegrator($userId))
	{
		return false;
	}

	if (self::isActivePaidSupportForAll())
	{
		return true;
	}

	if (!$userId)
	{
		return false;
	}

	return self::isUserAdmin($userId) || self::isUserIntegrator($userId);
}