added integer validation check to user auth closure.

This commit is contained in:
Taylor Otwell 2011-10-09 23:23:57 -05:00
parent 17385697c0
commit e6f84bffd4
1 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,10 @@
'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);
}
},
/*