Beispiel #1
0
 /**
  * Determines how many users are in particular tenant. Tenant identifier is used for look up.
  * 
  * @param int $iTenantId Tenant identifier.
  * 
  * @return int | false
  */
 public function getUsersCountForTenant($iTenantId)
 {
     $mResultCount = false;
     if ($this->oConnection->Execute($this->oCommandCreator->getUsersCountForTenantQuery($iTenantId))) {
         $oRow = $this->oConnection->GetNextRecord();
         if ($oRow) {
             $mResultCount = (int) $oRow->users_count;
         }
         $this->oConnection->FreeResult();
     }
     $this->throwDbExceptionIfExist();
     return $mResultCount;
 }