Merge pull request #6674 from nextcloud/backport-6549-stable12
[stable12] don't pass User object when uid string is expected
This commit is contained in:
commit
b1d5acd15f
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue