• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/controller/ads/leadads/service.php
  • Класс: Bitrix\Crm\Controller\Ads\LeadAds\Service
  • Вызов: Service::checkProfileAction
public function checkProfileAction($type)
{
	if (!$service = $this->getService())
	{
		$this->addError(
			new Error("Service not available.")
		);

		return $this->errorResponse();
	}

	$account = $service->getAccount($type);
	if ($account->checkNewAuthInfo())
	{
		return $this->successResponse();
	}

	$this->addError(
		new Error("Profile not available")
	);

	return $this->errorResponse();
}