don't pass User object when uid string is expected

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2017-09-18 13:19:47 +02:00
parent 0bf3435159
commit ed0d42dcea
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
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();
}