summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/api.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api.php b/lib/api.php
index d21851d50..707e4ac21 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -168,7 +168,7 @@ class ApiAction extends Action
$timezone = 'UTC';
- if ($user->timezone) {
+ if (!empty($user) && $user->timezone) {
$timezone = $user->timezone;
}