/** * @param string $sTenantLogin * @param string $sTenantPassword = null * * @return int */ public function GetTenantIdByLogin($sTenantLogin, $sTenantPassword = null) { $iTenantId = 0; if ($this->oConnection->Execute($this->oCommandCreator->GetTenantIdByLogin($sTenantLogin, $sTenantPassword))) { $oRow = $this->oConnection->GetNextRecord(); if ($oRow) { $iTenantId = (int) $oRow->id_tenant; } $this->oConnection->FreeResult(); } $this->throwDbExceptionIfExist(); return $iTenantId; }