From 1abce9b2faa21bac3caa52f9589f4cb835e2dd5e Mon Sep 17 00:00:00 2001
From: Fürni <ispconfig@mail.fuerni.eu>
Date: Tue, 29 Mar 2016 12:28:55 -0400
Subject: [PATCH] Support different Crypt Hash Algorithms
---
interface/web/mail/mail_user_edit.php | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index 3c38873..e1e05d3 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -207,6 +207,16 @@
$app->uses('getconf');
$mail_config = $app->getconf->get_server_config(!empty($domain["server_id"]) ? $domain["server_id"] : '', 'mail');
+ // Set Maildir format
+ if ($this->id == 0) {
+ $this->dataRecord['maildir_format'] = $sys_config['maildir_format'];
+ }
+ else {
+ // restore Maildir format
+ $tmp = $app->db->queryOneRecord("SELECT maildir_format FROM mail_user WHERE mailuser_id = ".$app->functions->intval($this->id));
+ $this->dataRecord['maildir_format'] = $tmp['maildir_format'];
+ }
+
//* compose the email field
if(isset($_POST["email_local_part"]) && isset($_POST["email_domain"])) {
$this->dataRecord["email"] = strtolower($_POST["email_local_part"]."@".$app->functions->idn_encode($_POST["email_domain"]));
@@ -245,9 +255,9 @@
$this->dataRecord["login"] = isset($this->dataRecord["email"]) ? $this->dataRecord["email"] : '';
}
//* if autoresponder checkbox not selected, do not save dates
- if (!isset($_POST['autoresponder']) && array_key_exists('autoresponder_start_date', $_POST)) {
- $this->dataRecord['autoresponder_start_date'] = array_map(create_function('$item', 'return 0;'), $this->dataRecord['autoresponder_start_date']);
- $this->dataRecord['autoresponder_end_date'] = array_map(create_function('$item', 'return 0;'), $this->dataRecord['autoresponder_end_date']);
+ if (!isset($_POST['autoresponder'])) {
+ $this->dataRecord['autoresponder_start_date'] = '';
+ $this->dataRecord['autoresponder_end_date'] = '';
}
parent::onSubmit();
--
Gitblit v1.9.1