<?php

/**
 * Filtros
 */

/**
 * Solo aplicado cuando es para un sistema (Sin front end)
 */
Route::filter('auth', function()
{
	if (Auth::guest()) {
		return Redirect::guest('admin/login');
	}
	else if(Auth::user()->active != 1)
	{
		Auth::logout();
		Alert::message(trans('auth::message.error_authentication'), 'danger');
		return Redirect::guest('admin/login');
	}
	
});