• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/leadads/form.php
  • Класс: BitrixSeoLeadAdsForm
  • Вызов: Form::getGroupAuthAdapter
public function getGroupAuthAdapter(): ?RetargetingAuthAdapter
{
	if (!self::isGroupAuthUsed())
	{
		return null;
	}

	$adapter = RetargetingAuthAdapter::create(static::TYPE_CODE . '.groups', $this->service);
	$adapter = $adapter->setParameters($this->getAuthParameters());
	$row = InternalsCallbackSubscriptionTable::getRow([
		'filter' => [
			'=TYPE' => static::TYPE_CODE,
		]
	]);

	if ($row && $row['HAS_AUTH'] !== 'Y' && $adapter->hasAuth())
	{
		InternalsCallbackSubscriptionTable::update($row['ID'], ['HAS_AUTH' => 'Y']);
	}

	return $adapter;
}