mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 19:01:58 +00:00
This commit is contained in:
@@ -123,6 +123,8 @@ class Authenticate
|
|||||||
Log::debug('Guard array is not empty.');
|
Log::debug('Guard array is not empty.');
|
||||||
|
|
||||||
foreach ($guards as $guard) {
|
foreach ($guards as $guard) {
|
||||||
|
Log::debug(sprintf('Now in guard loop, guard is "%s"', $guard));
|
||||||
|
$this->auth->guard($guard)->authenticate();
|
||||||
if ($this->auth->guard($guard)->check()) {
|
if ($this->auth->guard($guard)->check()) {
|
||||||
/** @noinspection PhpVoidFunctionResultUsedInspection */
|
/** @noinspection PhpVoidFunctionResultUsedInspection */
|
||||||
return $this->auth->shouldUse($guard); // @phpstan-ignore-line
|
return $this->auth->shouldUse($guard); // @phpstan-ignore-line
|
||||||
|
@@ -119,7 +119,6 @@ class RemoteUserGuard implements Guard
|
|||||||
public function guest(): bool
|
public function guest(): bool
|
||||||
{
|
{
|
||||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||||
$this->authenticate();
|
|
||||||
return !$this->check();
|
return !$this->check();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +128,6 @@ class RemoteUserGuard implements Guard
|
|||||||
public function check(): bool
|
public function check(): bool
|
||||||
{
|
{
|
||||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||||
$this->authenticate();
|
|
||||||
return !is_null($this->user());
|
return !is_null($this->user());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +137,7 @@ class RemoteUserGuard implements Guard
|
|||||||
public function user(): ?User
|
public function user(): ?User
|
||||||
{
|
{
|
||||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||||
$this->authenticate();
|
//$this->authenticate();
|
||||||
return $this->user;
|
return $this->user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user