Skip to content

Commit 68cfa12

Browse files
author
wrongecho
committed
Anonymous/Guest tickets - Add the anon email as a watcher
1 parent 19221b8 commit 68cfa12

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cron_ticket_email_parser.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date
147147
}
148148
}
149149

150+
// Guest ticket watchers
151+
if ($client_id == 0) {
152+
mysqli_query($mysqli, "INSERT INTO ticket_watchers SET watcher_email = '$contact_email_esc', watcher_ticket_id = $id");
153+
}
154+
150155
$data = [];
151156
if ($config_ticket_client_general_notifications == 1) {
152157
$subject_email = "Ticket created - [$config_ticket_prefix$ticket_number] - $subject";
@@ -162,7 +167,7 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date
162167
}
163168

164169
if ($config_ticket_new_ticket_notification_email) {
165-
if ($client_id == 0){
170+
if ($client_id == 0) {
166171
$client_name = "Guest";
167172
} else {
168173
$client_sql = mysqli_query($mysqli, "SELECT client_name FROM clients WHERE client_id = $client_id");

0 commit comments

Comments
 (0)