aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TemplateLayout.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r--lib/private/TemplateLayout.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 4b53af37679..e2ac89dafc4 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -82,7 +82,8 @@ class TemplateLayout extends \OC_Template {
$this->initialState = \OC::$server->get(IInitialStateService::class);
// Add fallback theming variables if theming is disabled
- if (!\OC::$server->getAppManager()->isEnabledForUser('theming')) {
+ if ($renderAs !== TemplateResponse::RENDER_AS_USER
+ || !\OC::$server->getAppManager()->isEnabledForUser('theming')) {
// TODO cache generated default theme if enabled for fallback if server is erroring ?
Util::addStyle('theming', 'default');
}