summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-09-18 13:19:47 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-09-18 13:19:47 +0200
commit08377454778bb3566605a827d2a1f6d3729ffb88 (patch)
tree74d589efd08f1187ad7e762c5bc02bd0a0ae5e6b /lib
parent27ad83f541d7adbcce307e4037265bb109aa5746 (diff)
downloadnextcloud-server-08377454778bb3566605a827d2a1f6d3729ffb88.tar.gz
nextcloud-server-08377454778bb3566605a827d2a1f6d3729ffb88.zip
don't pass User object when uid string is expected
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-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();
}