Merge pull request #6549 from nextcloud/fix-6534

don't pass User object when uid string is expected
This commit is contained in:
Morris Jobke 2017-09-18 14:28:14 +02:00 committed by GitHub
commit a0132a49a6
1 changed files with 2 additions and 1 deletions

View File

@ -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();
}