mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-31 19:27:51 -06:00
Fix redirect loop.
This commit is contained in:
parent
f50244a41f
commit
9f992f003d
@ -13,6 +13,7 @@ use Request as Rq;
|
||||
use Session;
|
||||
use Twig;
|
||||
use Validator;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class AuthController
|
||||
@ -23,6 +24,19 @@ class AuthController extends Controller
|
||||
{
|
||||
use AuthenticatesAndRegistersUsers, ThrottlesLogins;
|
||||
|
||||
/**
|
||||
* Log the user out of the application.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function getLogout()
|
||||
{
|
||||
Auth::logout();
|
||||
Log::debug('Logout and redirect to root.');
|
||||
|
||||
return redirect('/login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application registration form.
|
||||
*
|
||||
|
@ -7,7 +7,7 @@ use Config;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Illuminate\Http\Request;
|
||||
use Preferences;
|
||||
|
||||
use Auth;
|
||||
/**
|
||||
* Class Authenticate
|
||||
*
|
||||
@ -54,7 +54,8 @@ class Authenticate
|
||||
}
|
||||
|
||||
if (intval($this->auth->user()->blocked) == 1) {
|
||||
return redirect()->route('logout');
|
||||
Auth::logout();
|
||||
return redirect()->route('index');
|
||||
}
|
||||
|
||||
// if logged in, set user language:
|
||||
|
Loading…
Reference in New Issue
Block a user