diff --git a/src/GoalioForgotPassword/Mapper/Password.php b/src/GoalioForgotPassword/Mapper/Password.php index 145e13c..0de2db5 100644 --- a/src/GoalioForgotPassword/Mapper/Password.php +++ b/src/GoalioForgotPassword/Mapper/Password.php @@ -24,18 +24,16 @@ public function remove($passwordModel) public function findByUserId($userId) { - $select = $this->select() - ->from($this->tableName) + $select = $this->getSelect() ->where(array($this->userField => $userId)); - return $this->selectWith($select)->current(); + return $this->select($select)->current(); } public function findByRequestKey($key) { - $select = $this->select() - ->from($this->tableName) + $select = $this->getSelect() ->where(array($this->keyField => $key)); - return $this->selectWith($select)->current(); + return $this->select($select)->current(); } public function cleanExpiredForgotRequests($expiryTime=86400)