mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix: add user id header when redirecting to default app
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
parent
0e944c190d
commit
2eecf81833
1 changed files with 3 additions and 1 deletions
|
|
@ -1190,7 +1190,9 @@ class OC {
|
|||
// Redirect to the default app or login only as an entry point
|
||||
if ($requestPath === '') {
|
||||
// Someone is logged in
|
||||
if (Server::get(IUserSession::class)->isLoggedIn()) {
|
||||
$userSession = Server::get(IUserSession::class);
|
||||
if ($userSession->isLoggedIn()) {
|
||||
header('X-User-Id: ' . $userSession->getUser()?->getUID());
|
||||
header('Location: ' . Server::get(IURLGenerator::class)->linkToDefaultPageUrl());
|
||||
} else {
|
||||
// Not handled and not logged in
|
||||
|
|
|
|||
Loading…
Reference in a new issue