Skip to content

Commit a93ef85

Browse files
salmart-devbackportbot[bot]
authored andcommitted
fix: add user id header when redirecting to default app
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
1 parent 2b97cf7 commit a93ef85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/base.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,9 @@ public static function handleRequest(): void {
11901190
// Redirect to the default app or login only as an entry point
11911191
if ($requestPath === '') {
11921192
// Someone is logged in
1193-
if (Server::get(IUserSession::class)->isLoggedIn()) {
1193+
$userSession = Server::get(IUserSession::class);
1194+
if ($userSession->isLoggedIn()) {
1195+
header('X-User-Id: ' . $userSession->getUser()?->getUID());
11941196
header('Location: ' . Server::get(IURLGenerator::class)->linkToDefaultPageUrl());
11951197
} else {
11961198
// Not handled and not logged in

0 commit comments

Comments
 (0)