1
0
mirror of https://github.com/flarum/core.git synced 2025-10-19 18:56:44 +02:00

Delete associated notifications when deleting discussions, posts, and users. fixes #1380

This commit is contained in:
Toby Zerner
2018-11-11 16:59:24 +10:30
parent 6d14d0c39b
commit bf8bc0222f
4 changed files with 45 additions and 0 deletions

View File

@@ -125,6 +125,8 @@ class User extends AbstractModel
static::deleted(function (User $user) {
$user->raise(new Deleted($user));
Notification::whereSubject($user)->delete();
});
static::$dispatcher->dispatch(