Merge branch '366-add-semicolor-to-email-separator' into '2-6-0'
Replace semicolons with commas for multiple emails Closes #366 See merge request !11
This commit is contained in:
commit
0dad89d7b5
@ -63,6 +63,9 @@ if ($hesk_settings['can_sel_lang']) {
|
|||||||
}
|
}
|
||||||
$tmpvar['name'] = hesk_input(hesk_POST('name')) or $hesk_error_buffer['name'] = $hesklang['enter_your_name'];
|
$tmpvar['name'] = hesk_input(hesk_POST('name')) or $hesk_error_buffer['name'] = $hesklang['enter_your_name'];
|
||||||
$tmpvar['email'] = hesk_POST('email');
|
$tmpvar['email'] = hesk_POST('email');
|
||||||
|
if ($hesk_settings['multi_eml']) {
|
||||||
|
$tmpvar['email'] = str_replace(';',',', $tmpvar['email']);
|
||||||
|
}
|
||||||
$tmpvar['category'] = intval(hesk_POST('category')) or $hesk_error_buffer['category'] = $hesklang['sel_app_cat'];
|
$tmpvar['category'] = intval(hesk_POST('category')) or $hesk_error_buffer['category'] = $hesklang['sel_app_cat'];
|
||||||
$tmpvar['priority'] = hesk_POST('priority');
|
$tmpvar['priority'] = hesk_POST('priority');
|
||||||
$tmpvar['priority'] = strlen($tmpvar['priority']) ? intval($tmpvar['priority']) : -1;
|
$tmpvar['priority'] = strlen($tmpvar['priority']) ? intval($tmpvar['priority']) : -1;
|
||||||
|
@ -304,6 +304,7 @@ function hesk_verifyEmailMatch($trackingID, $my_email = 0, $ticket_email = 0, $e
|
|||||||
|
|
||||||
/* Validate email */
|
/* Validate email */
|
||||||
if ($hesk_settings['multi_eml']) {
|
if ($hesk_settings['multi_eml']) {
|
||||||
|
$ticket_email = str_replace(';', ',', $ticket_email);
|
||||||
$valid_emails = explode(',', strtolower($ticket_email));
|
$valid_emails = explode(',', strtolower($ticket_email));
|
||||||
if (in_array(strtolower($my_email), $valid_emails)) {
|
if (in_array(strtolower($my_email), $valid_emails)) {
|
||||||
/* Match, clean brute force attempts and return true */
|
/* Match, clean brute force attempts and return true */
|
||||||
|
@ -158,8 +158,13 @@ if ($hesk_settings['confirm_email']) {
|
|||||||
// Anything entered as email confirmation?
|
// Anything entered as email confirmation?
|
||||||
if (strlen($tmpvar['email2'])) {
|
if (strlen($tmpvar['email2'])) {
|
||||||
// Do we have multiple emails?
|
// Do we have multiple emails?
|
||||||
if ($hesk_settings['multi_eml'] && count(array_diff(explode(',', strtolower($tmpvar['email'])), explode(',', strtolower($tmpvar['email2'])))) == 0) {
|
if ($hesk_settings['multi_eml']) {
|
||||||
$_SESSION['c_email2'] = $_POST['email2'];
|
$tmpvar['email'] = str_replace(';', ',', $tmpvar['email']);
|
||||||
|
$tmpvar['email2'] = str_replace(';', ',', $tmpvar['email2']);
|
||||||
|
|
||||||
|
if (count(array_diff(explode(',', strtolower($tmpvar['email'])), explode(',', strtolower($tmpvar['email2'])))) == 0) {
|
||||||
|
$_SESSION['c_email2'] = $_POST['email2'];
|
||||||
|
}
|
||||||
} // Single email address match
|
} // Single email address match
|
||||||
elseif (!$hesk_settings['multi_eml'] && strtolower($tmpvar['email']) == strtolower($tmpvar['email2'])) {
|
elseif (!$hesk_settings['multi_eml'] && strtolower($tmpvar['email']) == strtolower($tmpvar['email2'])) {
|
||||||
$_SESSION['c_email2'] = $_POST['email2'];
|
$_SESSION['c_email2'] = $_POST['email2'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user