mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
Merge pull request #6675 from nextcloud/backport-6549-stable11
[stable11] don't pass User object when uid string is expected
This commit is contained in:
commit
0589ceb220
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue