mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-03 12:47:17 -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 Session;
|
||||||
use Twig;
|
use Twig;
|
||||||
use Validator;
|
use Validator;
|
||||||
|
use Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AuthController
|
* Class AuthController
|
||||||
@ -23,6 +24,19 @@ class AuthController extends Controller
|
|||||||
{
|
{
|
||||||
use AuthenticatesAndRegistersUsers, ThrottlesLogins;
|
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.
|
* Show the application registration form.
|
||||||
*
|
*
|
||||||
|
@ -7,7 +7,7 @@ use Config;
|
|||||||
use Illuminate\Contracts\Auth\Guard;
|
use Illuminate\Contracts\Auth\Guard;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
|
use Auth;
|
||||||
/**
|
/**
|
||||||
* Class Authenticate
|
* Class Authenticate
|
||||||
*
|
*
|
||||||
@ -54,7 +54,8 @@ class Authenticate
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (intval($this->auth->user()->blocked) == 1) {
|
if (intval($this->auth->user()->blocked) == 1) {
|
||||||
return redirect()->route('logout');
|
Auth::logout();
|
||||||
|
return redirect()->route('index');
|
||||||
}
|
}
|
||||||
|
|
||||||
// if logged in, set user language:
|
// if logged in, set user language:
|
||||||
|
Loading…
Reference in New Issue
Block a user