summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-09-18 14:28:14 +0200
committerGitHub <noreply@github.com>2017-09-18 14:28:14 +0200
commita0132a49a6d5ae119bfd1fb0fa8fa933b2a4dd82 (patch)
treee405350a32575d579d7a2efadec0369109317946
parent53057f2bd0fd1e7239ebd5cb6f82eb2766f642ee (diff)
parent08377454778bb3566605a827d2a1f6d3729ffb88 (diff)
downloadnextcloud-server-a0132a49a6d5ae119bfd1fb0fa8fa933b2a4dd82.tar.gz
nextcloud-server-a0132a49a6d5ae119bfd1fb0fa8fa933b2a4dd82.zip
Merge pull request #6549 from nextcloud/fix-6534
don't pass User object when uid string is expected
-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();
}