Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit 8ba3068

Browse files
committed
Fixed: When generating a notification via PHP, it was not displayed as unread
1 parent 25f1efc commit 8ba3068

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Resources/contao/models/MemberNotificationModel.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function findByMember($memberId, $read=null, array $arrOptions=arr
7575
return static::findBy(['pid='.$memberId], null);
7676
}
7777

78-
return static::findBy(['invisible=?', 'pid=?'], [($read === 0 ? '' : $read), $memberId], $arrOptions);
78+
return static::findBy(['invisible=?', 'pid=?'], [$read, $memberId], $arrOptions);
7979
}
8080

8181
public static function add($memberId, $title, $teaser, $jumpTo='')
@@ -87,6 +87,7 @@ public static function add($memberId, $title, $teaser, $jumpTo='')
8787
$objNotification->title = $title;
8888
$objNotification->teaser = $teaser;
8989
$objNotification->jumpTo = $jumpTo;
90+
$objNotification->invisible = 0;
9091

9192
$objNotification->save();
9293
}

0 commit comments

Comments
 (0)