예제 #1
0
 /**
  * @param CTenant $oTenant
  *
  * @return bool
  */
 public function isTenantExists(CTenant $oTenant)
 {
     $bResult = false;
     $niExceptTenantId = 0 < $oTenant->IdTenant ? $oTenant->IdTenant : null;
     if ($this->oConnection->Execute($this->oCommandCreator->isTenantExists($oTenant->Login, $niExceptTenantId))) {
         $oRow = $this->oConnection->GetNextRecord();
         if ($oRow && 0 < (int) $oRow->tenants_count) {
             $bResult = true;
         }
         $this->oConnection->FreeResult();
     }
     $this->throwDbExceptionIfExist();
     return $bResult;
 }