mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-01 12:23:38 +03:00
Set the Google attendee data only if all the values are available
This commit is contained in:
parent
2bc517db5f
commit
83b15dddea
1 changed files with 2 additions and 2 deletions
|
@ -181,7 +181,7 @@ class Google_sync
|
||||||
$event_provider->setEmail($provider['email']);
|
$event_provider->setEmail($provider['email']);
|
||||||
$event->attendees[] = $event_provider;
|
$event->attendees[] = $event_provider;
|
||||||
|
|
||||||
if (!empty($customer)) {
|
if (!empty($customer['first_name']) && !empty($customer['last_name']) && !empty($customer['email'])) {
|
||||||
$event_customer = new Google_Service_Calendar_EventAttendee();
|
$event_customer = new Google_Service_Calendar_EventAttendee();
|
||||||
$event_customer->setDisplayName($customer['first_name'] . ' ' . $customer['last_name']);
|
$event_customer->setDisplayName($customer['first_name'] . ' ' . $customer['last_name']);
|
||||||
$event_customer->setEmail($customer['email']);
|
$event_customer->setEmail($customer['email']);
|
||||||
|
@ -243,7 +243,7 @@ class Google_sync
|
||||||
$event_provider->setEmail($provider['email']);
|
$event_provider->setEmail($provider['email']);
|
||||||
$event->attendees[] = $event_provider;
|
$event->attendees[] = $event_provider;
|
||||||
|
|
||||||
if (!empty($customer)) {
|
if (!empty($customer['first_name']) && !empty($customer['last_name']) && !empty($customer['email'])) {
|
||||||
$event_customer = new Google_Service_Calendar_EventAttendee();
|
$event_customer = new Google_Service_Calendar_EventAttendee();
|
||||||
$event_customer->setDisplayName($customer['first_name'] . ' ' . $customer['last_name']);
|
$event_customer->setDisplayName($customer['first_name'] . ' ' . $customer['last_name']);
|
||||||
$event_customer->setEmail($customer['email']);
|
$event_customer->setEmail($customer['email']);
|
||||||
|
|
Loading…
Reference in a new issue