diff --git a/core/datamodel.core.xml b/core/datamodel.core.xml index c40de2570..f4f52e55e 100644 --- a/core/datamodel.core.xml +++ b/core/datamodel.core.xml @@ -166,6 +166,10 @@ $oRecipientsSet = new DBObjectSet($oRecipientsSearch); [$sPreviousLanguage, $aPreviousPluginProperties] = $this->SetNotificationLanguage(); while ($oRecipient = $oRecipientsSet->Fetch()) { + // Skip recipients that have no users + if(get_class($oRecipient) === Person::class && UserRights::GetUserFromPerson($oRecipient) === null) { + continue; + } $oEvent = new EventiTopNotification(); $oEvent->Set('title', MetaModel::ApplyParams($this->Get('title'), $aContextArgs)); $oEvent->Set('message', MetaModel::ApplyParams($this->Get('message'), $aContextArgs));