Skip to content

Commit 257cd78

Browse files
committed
Fixed: FS#812 - Mails are missing for user if the username conatins uppercase characters.
1 parent a4f044f commit 257cd78

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

interface/web/mail/mail_domain_edit.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ function onSubmit() {
174174
// Clients may not set the client_group_id, so we unset them if user is not a admin
175175
if(!$app->auth->has_clients($_SESSION['s']['user']['userid'])) unset($this->dataRecord["client_group_id"]);
176176
}
177+
178+
//* make sure that the email domain is lowercase
179+
if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
180+
181+
177182
parent::onSubmit();
178183
}
179184

interface/web/mail/mail_user_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function onSubmit() {
160160

161161
//* compose the email field
162162
if(isset($_POST["email_local_part"]) && isset($_POST["email_domain"])) {
163-
$this->dataRecord["email"] = $_POST["email_local_part"]."@".$_POST["email_domain"];
163+
$this->dataRecord["email"] = strtolower($_POST["email_local_part"]."@".$_POST["email_domain"]);
164164

165165
// Set the server id of the mailbox = server ID of mail domain.
166166
$this->dataRecord["server_id"] = $domain["server_id"];

0 commit comments

Comments
 (0)