summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/legacy/helper.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index 48b7d037c58..dd4f13f7d77 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -558,7 +558,8 @@ class OC_Helper {
|| $storage->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage')
) {
/** @var \OC\Files\Storage\Home $storage */
- $user = $storage->getUser();
+ $userInstance = $storage->getUser();
+ $user = ($userInstance === null) ? null : $userInstance->getUID();
} else {
$user = \OC::$server->getUserSession()->getUser()->getUID();
}