diff options
Diffstat (limited to 'src/Psecio/Gatekeeper/UserModel.php')
-rw-r--r-- | src/Psecio/Gatekeeper/UserModel.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Psecio/Gatekeeper/UserModel.php b/src/Psecio/Gatekeeper/UserModel.php index ac5c811..8b7b346 100644 --- a/src/Psecio/Gatekeeper/UserModel.php +++ b/src/Psecio/Gatekeeper/UserModel.php @@ -141,6 +141,19 @@ class UserModel extends \Psecio\Gatekeeper\Model\Mysql } /** + * Find a user by their given ID + * + * @param integer $userId User ID + * @return boolean Success/fail of find operation + */ + public function findByUserId($userId) + { + return $this->getDb()->find( + $this, array('id' => $userId) + ); + } + + /** * Attach a permission to a user account * * @param integer|PermissionModel $perm Permission ID or model isntance |