From 257cd788f8aebaa3703f67e9a367947042d669ae Mon Sep 17 00:00:00 2001 From: tbrehm Date: Thu, 16 Jul 2009 10:40:29 +0000 Subject: [PATCH] Fixed: FS#812 - Mails are missing for user if the username conatins uppercase characters. --- interface/web/mail/mail_domain_edit.php | 5 +++++ interface/web/mail/mail_user_edit.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index 94f2a36fe0..14ef8e2af9 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -174,6 +174,11 @@ class page_action extends tform_actions { // Clients may not set the client_group_id, so we unset them if user is not a admin if(!$app->auth->has_clients($_SESSION['s']['user']['userid'])) unset($this->dataRecord["client_group_id"]); } + + //* make sure that the email domain is lowercase + if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]); + + parent::onSubmit(); } diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 52228a8065..01e1490a68 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -160,7 +160,7 @@ class page_action extends tform_actions { //* 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"]; -- GitLab