• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/retargeting/authadapter.php
  • Класс: BitrixSeoRetargetingAuthAdapter
  • Вызов: AuthAdapter::getClientId
public function getClientId()
{
	if (!$this->canUseMultipleClients())
	{
		return null;
	}
	$clientId = $this->service->getClientId();
	if ($clientId)
	{
		$client = $this->getClientById($clientId);
		if ($client['engine_code'] == $this->getEngineCode())
		{
			return $clientId;
		}
		return null;
	}

	// try to guess account id from accounts list:
	$clients = $this->getClientList();
	foreach ($clients as $client)
	{
		if ($client['proxy_client_type'] == SeoService::CLIENT_TYPE_COMPATIBLE)
		{
			return $client['proxy_client_id'];
		}
	}
	return null;
}