only ask quote, if connection succeeds

This commit is contained in:
Ralf Becker 2012-10-11 10:00:03 +00:00
parent 028908ba1f
commit 76be223537

View File

@ -194,11 +194,10 @@ class emailadmin_dovecot extends defaultimap
$this->disconnect();
}
$this->openConnection(true);
$userData = array();
// we are authenticated with master but for current user
if(($quota = $this->getStorageQuotaRoot('INBOX')) && !PEAR::isError($quota))
if($this->openConnection(true) === true && ($quota = $this->getStorageQuotaRoot('INBOX')) && !PEAR::isError($quota))
{
$userData['quotaLimit'] = $quota['QMAX'] / 1024;
}