From b9a3ef486ebcde18a5ade37865ff8f397185d24f Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Sun, 24 Jul 2016 05:30:59 -0400 Subject: [PATCH] Fixed #3979 Mailbox users unable to save autoresponders --- interface/web/mail/mail_user_edit.php | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index a155cbd..a79d8f8 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -143,7 +143,6 @@ if($domain["domain"] != $app->functions->idn_encode($_POST["email_domain"])) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm"); } - //* if its an insert, check that the password is not empty if($this->id == 0 && $_POST["password"] == '') { $app->tform->errorMessage .= $app->tform->lng("error_no_pwd")."<br>"; @@ -237,8 +236,13 @@ $this->dataRecord["homedir"] = $mail_config["homedir_path"]; // Will be overwritten by mail_plugin - $this->dataRecord['uid'] = -1; - $this->dataRecord['gid'] = -1; + if ($mail_config["mailbox_virtual_uidgid_maps"] == 'y') { + $this->dataRecord['uid'] = -1; + $this->dataRecord['gid'] = -1; + } else { + $this->dataRecord['uid'] = intval($mail_config["mailuser_uid"]); + $this->dataRecord['gid'] = intval($mail_config["mailuser_gid"]); + } //* Check if there is no alias or forward with this address $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE active = 'y' AND source = ?", $this->dataRecord["email"]); -- Gitblit v1.9.1