Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix error on missing AUTHENTICATION_GUARD_EMAIL
Hannes Körber9082a7d9b980
diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.phpindex cf8d4688ce..4d4867b813 100644--- a/app/Support/Authentication/RemoteUserGuard.php+++ b/app/Support/Authentication/RemoteUserGuard.php@@ -80,11 +80,14 @@ class RemoteUserGuard implements Guard// store email address if present in header and not already set.$header = config('auth.guard_email');- $emailAddress = (string) (request()->server($header) ?? null);- $preference = app('preferences')->getForUser($retrievedUser, 'remote_guard_alt_email', null);- if (null !== $emailAddress && null === $preference && $emailAddress !== $userID) {- app('preferences')->setForUser($retrievedUser, 'remote_guard_alt_email', $emailAddress);+ if (null !== $header) {+ $emailAddress = (string) (request()->server($header) ?? null);+ $preference = app('preferences')->getForUser($retrievedUser, 'remote_guard_alt_email', null);++ if (null !== $emailAddress && null === $preference && $emailAddress !== $userID) {+ app('preferences')->setForUser($retrievedUser, 'remote_guard_alt_email', $emailAddress);+ }}Log::debug(sprintf('Result of getting user from provider: %s', $retrievedUser->email));