Skip to content

Commit

Permalink
Anonymous/Guest tickets - Add the anon email as a watcher
Browse files Browse the repository at this point in the history
  • Loading branch information
wrongecho committed Dec 14, 2024
1 parent 19221b8 commit 68cfa12
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cron_ticket_email_parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date
}
}

// Guest ticket watchers
if ($client_id == 0) {
mysqli_query($mysqli, "INSERT INTO ticket_watchers SET watcher_email = '$contact_email_esc', watcher_ticket_id = $id");
}

$data = [];
if ($config_ticket_client_general_notifications == 1) {
$subject_email = "Ticket created - [$config_ticket_prefix$ticket_number] - $subject";
Expand All @@ -162,7 +167,7 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date
}

if ($config_ticket_new_ticket_notification_email) {
if ($client_id == 0){
if ($client_id == 0) {
$client_name = "Guest";
} else {
$client_sql = mysqli_query($mysqli, "SELECT client_name FROM clients WHERE client_id = $client_id");
Expand Down

0 comments on commit 68cfa12

Please sign in to comment.