From 702f2c3146d58fbd963fe1dca1d38695679d39ae Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Wed, 30 Nov 2022 17:05:39 +0100 Subject: [PATCH] Also pick email address from apache filtered headers --- app/Support/Authentication/RemoteUserGuard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Support/Authentication/RemoteUserGuard.php b/app/Support/Authentication/RemoteUserGuard.php index c77435c832..08b85e5c25 100644 --- a/app/Support/Authentication/RemoteUserGuard.php +++ b/app/Support/Authentication/RemoteUserGuard.php @@ -81,7 +81,7 @@ class RemoteUserGuard implements Guard $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) {