diff --git a/ao.php b/ao.php index 2beb6fe1d6322afe3062954b22d5ca4205ccb6f5..5d4fb2fd87e1a70c0c8653339a910d47c33aaf2c 100644 --- a/ao.php +++ b/ao.php @@ -111,7 +111,11 @@ function ao_civicrm_validateForm($formName, &$fields, &$files, &$form, &$errors) } } */ if (!empty($assigneeContact)) { - $isAoEmail = CRM_Core_DAO::singleValueQuery("SELECT 1 FROM civicrm_email WHERE email LIKE '%@autismontario.com' AND contact_id = $assigneeContact LIMIT 1"); + $op = '='; + if (strpos($assigneeContact, ',') !== FALSE) { + $op = 'IN'; + } + $isAoEmail = CRM_Core_DAO::singleValueQuery("SELECT 1 FROM civicrm_email WHERE email LIKE '%@autismontario.com' AND contact_id {$op} {$assigneeContact} LIMIT 1"); if (!$isAoEmail) { $errors['assignee_contact_id'] = ts('The contact being assigned to this activity must be an AO staff member'); }