i'll paste the code so you will understand what i want to do, basically i made a route filter and tell that i want to redirect if user's account is not activated (i make it via email link).
Route::filter('activated', function()
{
if (Session::get('account_activated') == 0)
{
return Redirect::to('myaccount', 'MyAccountController@notActive');
}
});
Route::group(array('before' => 'auth'), function()
{
// Only authenticated users may enter...
Route::get('myaccount', 'MyAccountController@index');
});
When i log in, i'm putting into the session the "account_activated" key with the value that is in the database (corresponding to the user) so... when i try to enter here:
Route::group(array('before' => array('auth', 'activated')), function()
{
// Only authenticated and activated users may enter...
Route::get('sell', 'SellController@index');
});
I get this error: The HTTP status code "0" is not valid. Anyone know why is that? Thanks!