fix storing of mail account for an other user was not possible for admins

This commit is contained in:
Ralf Becker 2014-08-26 15:05:59 +00:00
parent d650dbb0b1
commit 987168a1cb

View File

@ -983,10 +983,16 @@ class emailadmin_wizard
{ {
// if admin username/password given, check if it is valid // if admin username/password given, check if it is valid
$account = new emailadmin_account($content); $account = new emailadmin_account($content);
$imap = $account->imapServer(); if ($account->acc_imap_administration)
if ($imap) $imap->checkAdminConnection(); {
// test sieve connection, if enabled and credentials available $imap = $account->imapServer(true);
if ($account->acc_sieve_enabled && $account->acc_imap_username) $account->imapServer()->retrieveRules(); if ($imap) $imap->checkAdminConnection();
}
// test sieve connection, if not called for other user, enabled and credentials available
if (!$content['called_for'] && $account->acc_sieve_enabled && $account->acc_imap_username)
{
$account->imapServer()->retrieveRules();
}
$new_account = !($content['acc_id'] > 0); $new_account = !($content['acc_id'] > 0);
// check for deliveryMode="forwardOnly", if a forwarding-address is given // check for deliveryMode="forwardOnly", if a forwarding-address is given
if ($content['acc_smtp_type'] != 'emailadmin_smtp' && if ($content['acc_smtp_type'] != 'emailadmin_smtp' &&