mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Code cleanup that (hopefully) matches style CI
This commit is contained in:
@@ -29,6 +29,7 @@ use FireflyIII\Exceptions\FireflyException;
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Contracts\Auth\Factory as Auth;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/**
|
||||
* Class Authenticate
|
||||
@@ -38,14 +39,14 @@ class Authenticate
|
||||
/**
|
||||
* The authentication factory instance.
|
||||
*
|
||||
* @var \Illuminate\Contracts\Auth\Factory
|
||||
* @var Auth
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new middleware instance.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\Factory $auth
|
||||
* @param Auth $auth
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -57,14 +58,14 @@ class Authenticate
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string[] ...$guards
|
||||
*
|
||||
* @return mixed
|
||||
* @param Request $request
|
||||
* @param Closure $next
|
||||
* @param string[] ...$guards
|
||||
*
|
||||
* @throws AuthenticationException
|
||||
* @throws FireflyException
|
||||
* @return mixed
|
||||
*
|
||||
*/
|
||||
public function handle($request, Closure $next, ...$guards)
|
||||
{
|
||||
@@ -78,11 +79,11 @@ class Authenticate
|
||||
* Determine if the user is logged in to any of the given guards.
|
||||
*
|
||||
* @param $request
|
||||
* @param array $guards
|
||||
* @param array $guards
|
||||
*
|
||||
* @return mixed
|
||||
* @throws AuthenticationException
|
||||
* @throws FireflyException
|
||||
* @return mixed
|
||||
*/
|
||||
protected function authenticate($request, array $guards)
|
||||
{
|
||||
@@ -96,10 +97,10 @@ class Authenticate
|
||||
// do an extra check on user object.
|
||||
/** @noinspection PhpUndefinedMethodInspection */
|
||||
$user = $this->auth->authenticate();
|
||||
if (1 === (int)$user->blocked) {
|
||||
$message = (string)trans('firefly.block_account_logout');
|
||||
if (1 === (int) $user->blocked) {
|
||||
$message = (string) trans('firefly.block_account_logout');
|
||||
if ('email_changed' === $user->blocked_code) {
|
||||
$message = (string)trans('firefly.email_changed_logout');
|
||||
$message = (string) trans('firefly.email_changed_logout');
|
||||
}
|
||||
app('session')->flash('logoutMessage', $message);
|
||||
/** @noinspection PhpUndefinedMethodInspection */
|
||||
|
Reference in New Issue
Block a user