/** * @param CAccount $oAccount * @return bool */ public function AccountExists(CAccount $oAccount) { $bResult = false; if ($this->oConnection->Execute($this->oCommandCreator->AccountExists($oAccount->Email, $oAccount->IncomingMailLogin, 0 < $oAccount->IdAccount ? $oAccount->IdAccount : null))) { $oRow = $this->oConnection->GetNextRecord(); if ($oRow && 0 < (int) $oRow->acct_count) { $bResult = true; } $this->oConnection->FreeResult(); } $this->throwDbExceptionIfExist(); return $bResult; }
/** * @param string $sEmail * @param int $niExceptAccountId = null * @return string */ public function AccountExists($sEmail, $sLogin, $niExceptAccountId = null) { return parent::AccountExists($sEmail, $sLogin, $niExceptAccountId) . ' LIMIT 1'; }