diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2016-10-11 17:48:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-11 17:48:15 +0300 |
commit | f82ef091508e1b266d2a4b2cbc8034ecc5cae029 (patch) | |
tree | e81343451895ca241d5dfadb90edfa88698aa46b /lib | |
parent | 30bc368a6e67ef4522ddead0de8b079be8c869d4 (diff) | |
parent | 1d9738006acae051cbffafdfc11b22dc7a1f0c2d (diff) |
Merge pull request #1698 from nextcloud/backport-1558-remove-notifications-upon-user-deletion-9
[stable9] Remove notifications upon user deletion
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/user/user.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/private/user/user.php b/lib/private/user/user.php index 7e1a0794c6c..a395e02ad28 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -212,10 +212,14 @@ class User implements IUser { \OC::$server->getCommentsManager()->deleteReferencesOfActor('users', $this->uid); \OC::$server->getCommentsManager()->deleteReadMarksFromUser($this); - } - if ($this->emitter) { - $this->emitter->emit('\OC\User', 'postDelete', array($this)); + $notification = \OC::$server->getNotificationManager()->createNotification(); + $notification->setUser($this->uid); + \OC::$server->getNotificationManager()->markProcessed($notification); + + if ($this->emitter) { + $this->emitter->emit('\OC\User', 'postDelete', array($this)); + } } return !($result === false); } |