mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix various code.
This commit is contained in:
@@ -56,7 +56,7 @@ class RemoteUserGuard implements Guard
|
||||
public function authenticate(): void
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
if (null !== $this->user) {
|
||||
if ($this->user instanceof User) {
|
||||
Log::debug(sprintf('%s is found: #%d, "%s".', $this->user::class, $this->user->id, $this->user->email));
|
||||
|
||||
return;
|
||||
@@ -112,14 +112,14 @@ class RemoteUserGuard implements Guard
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
|
||||
return null !== $this->user();
|
||||
return $this->user() instanceof User;
|
||||
}
|
||||
|
||||
public function user(): ?User
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
$user = $this->user;
|
||||
if (null === $user) {
|
||||
if (!$user instanceof User) {
|
||||
Log::debug('User is NULL');
|
||||
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user