diff --git a/apps/theming/lib/Service/ThemesService.php b/apps/theming/lib/Service/ThemesService.php index 8244e69e21911..d7127173848bb 100644 --- a/apps/theming/lib/Service/ThemesService.php +++ b/apps/theming/lib/Service/ThemesService.php @@ -170,12 +170,15 @@ public function isEnabled(ITheme $theme): bool { * @return string[] */ public function getEnabledThemes(): array { + $enforcedTheme = $this->config->getSystemValueString('enforce_theme', ''); $user = $this->userSession->getUser(); if ($user === null) { + if ($enforcedTheme !== '') { + return [$enforcedTheme]; + } return []; } - $enforcedTheme = $this->config->getSystemValueString('enforce_theme', ''); $enabledThemes = json_decode($this->config->getUserValue($user->getUID(), Application::APP_ID, 'enabled-themes', '["default"]')); if ($enforcedTheme !== '') { return array_merge([$enforcedTheme], $enabledThemes); diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 5ebada9293403..363fe9dde2628 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -25,7 +25,9 @@ -
+ data-themes=""> $initialState) { ?> diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php index 81b384987b8f8..8743554226961 100644 --- a/core/templates/layout.public.php +++ b/core/templates/layout.public.php @@ -26,11 +26,13 @@ - - - $initialState) { ?> - - + data-themes=""> + + $initialState) { ?> + +