From 5612a98994a576f5d54482d4c33e2671362420e4 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 28 Feb 2017 18:39:05 +0100 Subject: [PATCH] give quota-limit from SMTP/SQL precedence over (cached) quota from Dovecot --- api/src/Mail/Account.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/Mail/Account.php b/api/src/Mail/Account.php index d77ee084e9..9e7e66f9bd 100644 --- a/api/src/Mail/Account.php +++ b/api/src/Mail/Account.php @@ -309,6 +309,11 @@ class Account implements \ArrayAccess $this->imapServer($this->user) && is_a($this->imapServer, __NAMESPACE__.'\\Imap') && ($data = $this->imapServer->getUserData($GLOBALS['egw']->accounts->id2name($this->user)))) { + // give quota-limit from SMTP/SQL precedence over (cached) quota from Dovecot + if (isset($this->params['quotaLimit']) && is_a($this->imapServer, __NAMESPACE__.'\\Imap\\Dovecot')) + { + unset($data['quotaLimit']); + } $this->params = array_merge($this->params, $data); } }