summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/api.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api.php b/lib/api.php
index 4ed49e452..06d7c079d 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -140,12 +140,14 @@ class ApiAction extends Action
// Note: some profiles don't have an associated user
+ $defaultDesign = Design::siteDesign();
+
if (!empty($user)) {
$design = $user->getDesign();
}
if (empty($design)) {
- $design = Design::siteDesign();
+ $design = $defaultDesign;
}
$color = Design::toWebColor(empty($design->backgroundcolor) ? $defaultDesign->backgroundcolor : $design->backgroundcolor);