Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2016-10-11 17:48:15 +0300
committerGitHub <noreply@github.com>2016-10-11 17:48:15 +0300
commitf82ef091508e1b266d2a4b2cbc8034ecc5cae029 (patch)
treee81343451895ca241d5dfadb90edfa88698aa46b /lib
parent30bc368a6e67ef4522ddead0de8b079be8c869d4 (diff)
parent1d9738006acae051cbffafdfc11b22dc7a1f0c2d (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.php10
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);
}