fix: [internal] Throw exception when invalid event id provided for contact email

pull/6192/head
Jakub Onderka 2020-08-12 18:12:52 +02:00
parent 54aa24a31e
commit b37900ea75
1 changed files with 3 additions and 0 deletions

View File

@ -3183,6 +3183,9 @@ class Event extends AppModel
{
// fetch the event
$event = $this->read(null, $id);
if (!$event) {
throw new NotFoundException('Invalid Event.');
}
$this->User = ClassRegistry::init('User');
if (!$creator_only) {
// Insert extra field here: alertOrg or something, then foreach all the org members