From: Robin Appelman Date: Wed, 1 Apr 2020 12:24:21 +0000 (+0000) Subject: Merge pull request #19781 from nextcloud/quota-include-external-dont-use-current... X-Git-Tag: v19.0.0beta1~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c1368b86963b93a42ec98a856f8d307d922c8967;p=nextcloud-server.git Merge pull request #19781 from nextcloud/quota-include-external-dont-use-current-user Dont always use the current users quota when calculating storage info --- c1368b86963b93a42ec98a856f8d307d922c8967 diff --cc lib/private/legacy/util.php index 9fce2993a2a,9b574993f2c..f14095675dc --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@@ -251,10 -251,9 +251,9 @@@ class OC_Util ) { /** @var \OC\Files\Storage\Home $storage */ if (is_object($storage->getUser())) { - $user = $storage->getUser()->getUID(); - $quota = OC_Util::getUserQuota($user); + $quota = OC_Util::getUserQuota($storage->getUser()); if ($quota !== \OCP\Files\FileInfo::SPACE_UNLIMITED) { - return new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => $quota, 'root' => 'files')); + return new \OC\Files\Storage\Wrapper\Quota(['storage' => $storage, 'quota' => $quota, 'root' => 'files']); } } }