fix wrong parameter-name in admin-customers; check for disabled imap/pop3 when adding mail-accounts as customer, fixes #1298
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -1415,7 +1415,7 @@ if ($page == 'customers'
|
||||
// Disable or enable IMAP Login for customers Mail Accounts
|
||||
if ($email_imap != $result['imap']) {
|
||||
$upd_stmt = Database::prepare("UPDATE `" . TABLE_MAIL_USERS . "` SET `imap` = :imap WHERE `customerid` = :customerid");
|
||||
Database::pexecute($upd_stmt, array('pop3' => $email_imap, 'customerid' => $id));
|
||||
Database::pexecute($upd_stmt, array('imap' => $email_imap, 'customerid' => $id));
|
||||
}
|
||||
|
||||
$upd_data = array(
|
||||
|
||||
@@ -403,12 +403,17 @@ if ($page == 'overview') {
|
||||
} elseif ($page == 'accounts') {
|
||||
if ($action == 'add' && $id != 0) {
|
||||
// ensure the int is a positive one
|
||||
|
||||
if (isset($_POST['email_quota'])) {
|
||||
$quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong');
|
||||
}
|
||||
|
||||
if ($userinfo['email_accounts'] == '-1' || ($userinfo['email_accounts_used'] < $userinfo['email_accounts'])) {
|
||||
|
||||
// check for imap||pop3 == 1, see #1298
|
||||
if ($userinfo['imap'] != '1' && $userinfo['pop3'] != '1') {
|
||||
standard_error('notallowedtouseaccounts');
|
||||
}
|
||||
|
||||
$stmt = Database::prepare("SELECT `id`, `email`, `email_full`, `iscatchall`, `destination`, `customerid`, `popaccountid`, `domainid` FROM `" . TABLE_MAIL_VIRTUAL . "`
|
||||
WHERE `customerid`= :cid
|
||||
AND `id`= :id"
|
||||
|
||||
@@ -1981,4 +1981,5 @@ $lng['error']['sslredirectonlypossiblewithsslipport'] = 'Using the SSL redirect
|
||||
$lng['error']['fcgidstillenableddeadlock'] = 'FCGID is currently active.<br />Please deactivate it before switching to another webserver than Apache2';
|
||||
$lng['error']['send_report_title'] = 'Send error report';
|
||||
$lng['error']['send_report_desc'] = 'Thank you for reporting this error and helping us to froxlor improve froxlor.<br />This is the email which will be sent to the froxlor developer team:';
|
||||
$lng['error']['send_report'] = 'Send report';
|
||||
$lng['error']['send_report'] = 'Send report';
|
||||
$lng['error']['notallowedtouseaccounts'] = 'Your account does not allow using IMAP/POP3. You cannot add email accounts.';
|
||||
|
||||
@@ -1707,4 +1707,5 @@ $lng['error']['sslredirectonlypossiblewithsslipport'] = 'Eine SSL-Weiterleitung
|
||||
$lng['error']['fcgidstillenableddeadlock'] = 'FCGID ist derzeit aktiviert.<br />Bitte deaktiviere es, um einen anderen Webserver als Apache2 auswählen zu können.';
|
||||
$lng['error']['send_report_title'] = 'Fehler melden';
|
||||
$lng['error']['send_report_desc'] = 'Danke, dass Sie uns diesen Fehler melden und damit helfen Froxlor zu verbessern.<br />Folgender Bericht wird per Mail an das Froxlor Entwickler Team gesendet.';
|
||||
$lng['error']['send_report'] = 'Fehlerbericht senden';
|
||||
$lng['error']['send_report'] = 'Fehlerbericht senden';
|
||||
$lng['error']['notallowedtouseaccounts'] = 'Ihrem Konto ist die Nutzung von IMAP/POP3 nicht erlaubt, daher können keine E-Mail Konten angelegt werden';
|
||||
|
||||
Reference in New Issue
Block a user