From e6f84bffd4ace89f81d306e36ade2e6a75287c7b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 9 Oct 2011 23:23:57 -0500 Subject: [PATCH] added integer validation check to user auth closure. --- application/config/auth.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/application/config/auth.php b/application/config/auth.php index 9e70a54c..b7214551 100644 --- a/application/config/auth.php +++ b/application/config/auth.php @@ -21,7 +21,10 @@ return array( 'user' => function($id) { - if ( ! is_null($id)) return User::find($id); + if ( ! is_null($id) and filter_var($id, FILTER_VALIDATE_INT) !== false) + { + return User::find($id); + } }, /*