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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user