Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85975bd4 authored by Akhil's avatar Akhil 🙂
Browse files

Merge branch 'dev/use-owner-id' into 'main'

Use getOwner instead of getUser

See merge request !227
parents f7cc22b5 c9a57523
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
 			} else {
 				$free = $this->storage->free_space($path);
-				$quotaFree = max($this->getQuota() - $used, 0);
+				$ownerId = $this->storage->getUser()->getUID();
+				$ownerId = $this->storage->getOwner($path);
+				$mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0);
+				$mailQuotaUsage = max($mailQuotaUsage, 0); // to avoid negative mail quota usage value
+				$quotaFree = max($this->getQuota() - $used - $mailQuotaUsage, 0);