don't pass User object when uid string is expected
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
f6ccc1e0a1
commit
499da044b6
|
@ -558,7 +558,8 @@ class OC_Helper {
|
||||||
|| $storage->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage')
|
|| $storage->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage')
|
||||||
) {
|
) {
|
||||||
/** @var \OC\Files\Storage\Home $storage */
|
/** @var \OC\Files\Storage\Home $storage */
|
||||||
$user = $storage->getUser();
|
$userInstance = $storage->getUser();
|
||||||
|
$user = ($userInstance === null) ? null : $userInstance->getUID();
|
||||||
} else {
|
} else {
|
||||||
$user = \OC::$server->getUserSession()->getUser()->getUID();
|
$user = \OC::$server->getUserSession()->getUser()->getUID();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue