Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Merge pull request #6685 from nebulade/patch-2
James Colef33f9c797b1f
diff --cc app/Support/Authentication/RemoteUserGuard.phpindex df0315cffd,08b85e5c25..825aadfa3c--- a/app/Support/Authentication/RemoteUserGuard.php+++ b/app/Support/Authentication/RemoteUserGuard.php@@@ -82,14 -81,10 +82,14 @@@ class RemoteUserGuard implements Guar$header = config('auth.guard_email');if (null !== $header) {- $emailAddress = (string) (request()->server($header) ?? null);+ $emailAddress = (string) (request()->server($header) ?? apache_request_headers()[$header] ?? null);$preference = app('preferences')->getForUser($retrievedUser, 'remote_guard_alt_email');- if (null !== $emailAddress && null === $preference && $emailAddress !== $userID) {+ if ('' !== $emailAddress && null === $preference && $emailAddress !== $userID) {+ app('preferences')->setForUser($retrievedUser, 'remote_guard_alt_email', $emailAddress);+ }+ // if the pref isn't null and the object returned isn't null, update the email address.+ if ('' !== $emailAddress && null !== $preference && $emailAddress !== $preference->data) {app('preferences')->setForUser($retrievedUser, 'remote_guard_alt_email', $emailAddress);}}