Commit 3064f83f authored by mcramer's avatar mcramer

Fixed: login (if enabled) for email address should be set to mail address if not provided in form

parent c7d735ff
......@@ -207,7 +207,7 @@ class page_action extends tform_actions {
$sys_config = $app->getconf->get_global_config('mail');
if($sys_config["enable_custom_login"] == "y") {
if(!isset($_POST["login"])) $this->dataRecord["login"] = $this->dataRecord["email"];
if(!isset($_POST["login"]) || $_POST["login"] == '') $this->dataRecord["login"] = $this->dataRecord["email"];
elseif(strpos($_POST["login"], '@') !== false && $_POST["login"] != $this->dataRecord["email"]) $app->tform->errorMessage .= $app->tform->lng("error_login_email_txt")."<br>";
} else {
$this->dataRecord["login"] = isset($this->dataRecord["email"]) ? $this->dataRecord["email"] : '';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment