diff options
author | Chris Cornutt <chris.cornutt@hp.com> | 2015-01-07 16:38:16 -0600 |
---|---|---|
committer | Chris Cornutt <chris.cornutt@hp.com> | 2015-01-07 16:38:16 -0600 |
commit | 05c3c44fb6f94f98de430845adb50dc92ddfe4e4 (patch) | |
tree | 7b7cf97ff295e81dfc0056ab635075c72ba8d61f /src | |
parent | c1467aac7e9dbd37ff74bbc4fcd2c8e5fca23028 (diff) | |
download | gatekeeper-05c3c44fb6f94f98de430845adb50dc92ddfe4e4.zip gatekeeper-05c3c44fb6f94f98de430845adb50dc92ddfe4e4.tar.gz gatekeeper-05c3c44fb6f94f98de430845adb50dc92ddfe4e4.tar.bz2 |
fixing the fundByUserId method to work with data source, removing extra return statement1.3
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; } |