diff --git a/src/Application/Model/d3totp.php b/src/Application/Model/d3totp.php index c255de3..a049927 100644 --- a/src/Application/Model/d3totp.php +++ b/src/Application/Model/d3totp.php @@ -59,16 +59,18 @@ class d3totp extends BaseModel public function loadByUserId($userId) { $this->userId = $userId; - $oQB = d3database::getInstance()->getQueryBuilder(); + //$oQB = d3database::getInstance()->getQueryBuilder(); $oDb = $this->d3GetDb(); if ($oDb->getOne("SHOW TABLES LIKE '".$this->tableName."'")) { - $oQB->select('oxid') + $query = "SELECT oxid FROM ".$this->getViewName().' WHERE oxuserid = '.$oDb->quote($userId).' LIMIT 1'; + /*$oQB->select('oxid') ->from($this->getViewName()) ->where("oxuserid = " . $oQB->createNamedParameter($userId)) ->setMaxResults(1); - - $this->load($oDb->getOne($oQB->getSQL(), $oQB->getParameters())); + */ + //$this->load($oDb->getOne($oQB->getSQL(), $oQB->getParameters())); + $this->load($oDb->getOne($query)); } }