N°2039 - Fix notification not send if Person linked to more than 1 User

This commit is contained in:
Molkobain
2024-04-24 17:19:40 +02:00
parent 22fbb0ca13
commit 7b35692ce6

View File

@@ -284,7 +284,7 @@
while ($oRecipient = $oRecipientsSet->Fetch()) {
// Skip recipients that have no users
if (get_class($oRecipient) === Person::class && UserRights::GetUserFromPerson($oRecipient) === null) {
if ($oRecipient instanceof Person && UserRights::GetUserFromPerson($oRecipient, false) === null) {
continue;
}
if (!\Combodo\iTop\Service\Notification\NotificationsService::GetInstance()->IsSubscribed($oTrigger, $this, $oRecipient)) {