diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Psecio/Gatekeeper/ThrottleModel.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Psecio/Gatekeeper/ThrottleModel.php b/src/Psecio/Gatekeeper/ThrottleModel.php index ad78361..98f2305 100644 --- a/src/Psecio/Gatekeeper/ThrottleModel.php +++ b/src/Psecio/Gatekeeper/ThrottleModel.php @@ -83,7 +83,9 @@ class ThrottleModel extends \Psecio\Gatekeeper\Model\Mysql */ public function findByUserId($userId) { - return $this->find(array('user_id' => $userId)); + return $this->getDb()->find( + $this, array('user_id' => $userId) + ); } /** @@ -141,7 +143,6 @@ class ThrottleModel extends \Psecio\Gatekeeper\Model\Mysql if ($this->attempts >= $this->allowedAttemts) { $this->status = ThrottleModel::STATUS_BLOCKED; return $this->getDb()->save($this); - return false; } return true; } |