* eMailAdministration: if account is forward only; do not query IMAP Server for Quota; as there is no real mailbox

This commit is contained in:
Klaus Leithoff 2012-12-13 11:00:41 +00:00
parent 82ef388640
commit ee4ceba548

View File

@ -693,13 +693,16 @@ class emailadmin_bo extends so_sql
//_debug_array($ogUserData);
}
// query imap server only, if account is active (or no smtp server configured)
// imap server tells us stuff about quota only, so we should not query, if the account is forward only
if (!isset($ogUserData) || $ogUserData['accountStatus'] == 'active')
{
$queryIMAP = true;
if (isset($ogUserData['deliveryMode']) && $ogUserData['deliveryMode']==emailadmin_smtp::FORWARD_ONLY) $queryIMAP=false;
$icServerKeys = array_keys((array)$userProfile->ic_server);
$profileID = array_shift($icServerKeys);
$icServer = $userProfile->getIncomingServer($profileID);
if(($icServer instanceof defaultimap) && $username = $GLOBALS['egw']->accounts->id2name($_accountID)) {
$icUserData = $icServer->getUserData($username);
$icUserData = ($queryIMAP?$icServer->getUserData($username):array());
//_debug_array($icUserData);
}
}