Skip to content

Commit 3064f83

Browse files
author
mcramer
committed
Fixed: login (if enabled) for email address should be set to mail address if not provided in form
1 parent c7d735f commit 3064f83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/web/mail/mail_user_edit.php

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

208208
$sys_config = $app->getconf->get_global_config('mail');
209209
if($sys_config["enable_custom_login"] == "y") {
210-
if(!isset($_POST["login"])) $this->dataRecord["login"] = $this->dataRecord["email"];
210+
if(!isset($_POST["login"]) || $_POST["login"] == '') $this->dataRecord["login"] = $this->dataRecord["email"];
211211
elseif(strpos($_POST["login"], '@') !== false && $_POST["login"] != $this->dataRecord["email"]) $app->tform->errorMessage .= $app->tform->lng("error_login_email_txt")."<br>";
212212
} else {
213213
$this->dataRecord["login"] = isset($this->dataRecord["email"]) ? $this->dataRecord["email"] : '';

0 commit comments

Comments
 (0)