#30 Only validate emails if the help desk is configured to do so
This commit is contained in:
parent
94b2b97994
commit
efce82d1d6
@ -24,3 +24,6 @@ $modsForHesk_settings['maintenance_mode'] = 0;
|
||||
|
||||
//-- Set this to 1 to enable custom field names as keys
|
||||
$modsForHesk_settings['custom_field_setting'] = 0;
|
||||
|
||||
//-- Set this to 1 to enable email verification for new customers
|
||||
$modsForHesk_settings['customer_email_verification_required'] = 0;
|
@ -37,6 +37,7 @@ define('HESK_PATH','./');
|
||||
|
||||
// Get all the required files and functions
|
||||
require(HESK_PATH . 'hesk_settings.inc.php');
|
||||
require(HESK_PATH . 'modsForHesk_settings.inc.php');
|
||||
require(HESK_PATH . 'inc/common.inc.php');
|
||||
hesk_load_database_functions();
|
||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||
@ -360,7 +361,10 @@ if ($hesk_settings['attachments']['use'] && ! empty($attachments) )
|
||||
}
|
||||
}
|
||||
|
||||
// Check to see if the email address of the user is verified. If not, add the ticket to the stage_ticket table and send verification email
|
||||
// Should the helpdesk validate emails?
|
||||
$createTicket = true;
|
||||
if ($modsForHesk_settings['customer_email_verification_required'])
|
||||
{
|
||||
$verifiedEmailSql = "SELECT `Email` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."verified_emails` WHERE `Email` = '".hesk_dbEscape($tmpvar['email'])."'";
|
||||
$verifiedEmailRS = hesk_dbQuery($verifiedEmailSql);
|
||||
if ($verifiedEmailRS->num_rows == 0)
|
||||
@ -379,7 +383,10 @@ if ($verifiedEmailRS->num_rows == 0)
|
||||
|
||||
require(HESK_PATH . 'inc/email_functions.inc.php');
|
||||
hesk_notifyCustomer('verify_email');
|
||||
} else
|
||||
$createTicket = false;
|
||||
}
|
||||
}
|
||||
if ($createTicket)
|
||||
{
|
||||
//-- email has been verified, and a ticket can be created
|
||||
$ticket = hesk_newTicket($tmpvar);
|
||||
|
Loading…
x
Reference in New Issue
Block a user