• Модуль: biconnector
  • Путь к файлу: ~/bitrix/modules/biconnector/lib/manager.php
  • Класс: BitrixBIConnectorManager
  • Вызов: Manager::checkAccessKey
public function checkAccessKey($key)
{
	if ($key)
	{
		$dbKey = KeyTable::getList([
			'select' => [
				'ID',
				'CONNECTION',
			],
			'filter' => [
				'=ACCESS_KEY' => $key,
				'=ACTIVE' => 'Y',
			],
		])->fetch();
		if ($dbKey)
		{
			$this->connectionName = $dbKey['CONNECTION'];
			$pool = BitrixMainApplication::getInstance()->getConnectionPool();
			if ($this->connectionName === $pool::DEFAULT_CONNECTION_NAME)
			{
				$this->connectionName .= '_' . __CLASS__;
			}
			$this->keyId = $dbKey['ID'];
			return true;
		}
	}

	return false;
}