Fix import error when email address is empty or invalid

This commit is contained in:
Kijin Sung 2025-05-11 22:57:38 +09:00
parent 2ddf5aa8d8
commit 087f5a2265

View file

@ -416,7 +416,6 @@ class importerAdminController extends importer
{
$obj->email_address = $obj->user_id . '@example.com';
}
list($obj->email_id, $obj->email_host) = explode('@', $obj->email);
// Set the mailing option
if($obj->allow_mailing!='Y') $obj->allow_mailing = 'N';
// Set the message option
@ -453,9 +452,18 @@ class importerAdminController extends importer
$obj->email_address = $obj->user_id . '@example.com';
}
list($obj->email_id, $obj->email_host) = explode('@', $obj->email_address);
if (!$obj->email_id)
{
$obj->email_id = '';
}
if (!$obj->email_host)
{
$obj->email_host = '';
}
// Add a member
$output = executeQuery('member.insertMember', $obj);
if($output->toBool() && !($obj->password))
{
// Send a mail telling the user to reset his password.