CCrmExternalSaleImport::GetServerSessionID

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmExternalSaleImport
  4. GetServerSessionID
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_external_sale_import.php
  • Класс: \CCrmExternalSaleImport
  • Вызов: CCrmExternalSaleImport::GetServerSessionID
protected function GetServerSessionID()
{
	if($this->serverSessionID !== null)
	{
		return $this->serverSessionID;
	}

	$this->serverSessionID = "";
	$request = array(
		"METHOD" => "GET",
		"PATH" =>  CHTTP::urlAddParams($this->path, array("type" => "crm", "mode" => "checkauth"))
	);

	$response = $this->proxy->Send($request);
	if($response !== null)
	{
		$bodyLines = isset($response["BODY"]) ? explode("\n", $response["BODY"]) : array();
		if(count($bodyLines) > 3)
		{
			$ary = explode("=", $bodyLines[3]);
			if(count($ary) > 1)
			{
				$this->serverSessionID = trim($ary[1]);
			}
		}
	}
	return $this->serverSessionID;
}

Добавить комментарий