From 721fb2a75314cce1ea893cc2dc4e680dee28d5c0 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 11 Aug 2009 11:25:30 -0400
Subject: [PATCH] Fixed: FS#828 - DNS Zones created by resellers from template/Wizard not linked to the client
---
interface/web/mail/mail_user_edit.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index 52228a8..05ddeeb 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -75,7 +75,7 @@
$app->tpl->setVar("email_local_part",$email_parts[0]);
// Getting Domains of the user
- $sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r');
+ $sql = "SELECT domain FROM mail_domain WHERE ".$app->tform->getAuthSQL('r').' ORDER BY domain';
$domains = $app->db->queryAllRecords($sql);
$domain_select = '';
if(is_array($domains)) {
@@ -160,7 +160,7 @@
//* compose the email field
if(isset($_POST["email_local_part"]) && isset($_POST["email_domain"])) {
- $this->dataRecord["email"] = $_POST["email_local_part"]."@".$_POST["email_domain"];
+ $this->dataRecord["email"] = strtolower($_POST["email_local_part"]."@".$_POST["email_domain"]);
// Set the server id of the mailbox = server ID of mail domain.
$this->dataRecord["server_id"] = $domain["server_id"];
@@ -182,7 +182,7 @@
$this->dataRecord["gid"] = $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 source = '".$app->db->quote($this->dataRecord["email"])."'");
+ $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE active = 'y' AND source = '".$app->db->quote($this->dataRecord["email"])."'");
if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("duplicate_alias_or_forward_txt")."<br>";
unset($tmp);
--
Gitblit v1.9.1