Do not send an email to customer if no email is provided.

This commit is contained in:
Alex Tselegidis 2021-12-20 09:39:01 +01:00
parent bd9b5f196a
commit e4774ee991

View file

@ -85,7 +85,7 @@ class Notifications {
$ics_stream = $this->CI->ics_file->get_stream($appointment, $service, $provider, $customer);
// Notify customer.
$send_customer = filter_var(
$send_customer = ! empty($customer['email']) && filter_var(
setting('customer_notifications'),
FILTER_VALIDATE_BOOLEAN
);
@ -232,7 +232,7 @@ class Notifications {
}
// Notify customer.
$send_customer = filter_var(
$send_customer = ! empty($customer['email']) && filter_var(
setting('customer_notifications'),
FILTER_VALIDATE_BOOLEAN
);