#30 Submit ticket now checks the verified_emails table before creating
This commit is contained in:
parent
75b0e8233f
commit
691deb7f67
@ -360,7 +360,16 @@ if ($hesk_settings['attachments']['use'] && ! empty($attachments) )
|
||||
}
|
||||
}
|
||||
|
||||
// Insert ticket to database
|
||||
// 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
|
||||
$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)
|
||||
{
|
||||
//-- email has not yet been verified.
|
||||
$ticket = hesk_newTicket($tmpvar, false);
|
||||
} else
|
||||
{
|
||||
//-- email has been verified, and a ticket can be created
|
||||
$ticket = hesk_newTicket($tmpvar);
|
||||
|
||||
// Notify the customer
|
||||
@ -377,6 +386,7 @@ elseif ( ! $tmpvar['owner'] )
|
||||
{
|
||||
hesk_notifyStaff('new_ticket_staff', " `notify_new_unassigned` = '1' ");
|
||||
}
|
||||
}
|
||||
|
||||
// Next ticket show suggested articles again
|
||||
$_SESSION['ARTICLES_SUGGESTED']=false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user