From 987168a1cb4f2c77ceb1b2a9d54f5c071e477107 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 26 Aug 2014 15:05:59 +0000 Subject: [PATCH] fix storing of mail account for an other user was not possible for admins --- emailadmin/inc/class.emailadmin_wizard.inc.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/emailadmin/inc/class.emailadmin_wizard.inc.php b/emailadmin/inc/class.emailadmin_wizard.inc.php index 81fff441f4..13a9a03bac 100644 --- a/emailadmin/inc/class.emailadmin_wizard.inc.php +++ b/emailadmin/inc/class.emailadmin_wizard.inc.php @@ -983,10 +983,16 @@ class emailadmin_wizard { // if admin username/password given, check if it is valid $account = new emailadmin_account($content); - $imap = $account->imapServer(); - if ($imap) $imap->checkAdminConnection(); - // test sieve connection, if enabled and credentials available - if ($account->acc_sieve_enabled && $account->acc_imap_username) $account->imapServer()->retrieveRules(); + if ($account->acc_imap_administration) + { + $imap = $account->imapServer(true); + 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); // check for deliveryMode="forwardOnly", if a forwarding-address is given if ($content['acc_smtp_type'] != 'emailadmin_smtp' &&