summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-09-30 00:34:19 +0200
committerGitHub <noreply@github.com>2016-09-30 00:34:19 +0200
commit85522ff1ed534dce30dd3713cebe9fb1a67fbdfe (patch)
tree95ec6e84810307185a57965d2a220fc09c79de09 /lib
parent938b0d5597c899e6f9a1026ae5593d750412c6bf (diff)
parent4d1acfd4ef7087b8dc7795396c75fd239a6245f4 (diff)
downloadnextcloud-server-85522ff1ed534dce30dd3713cebe9fb1a67fbdfe.tar.gz
nextcloud-server-85522ff1ed534dce30dd3713cebe9fb1a67fbdfe.zip
Merge pull request #1558 from nextcloud/remove-notifications-upon-user-deletion
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 94ac8c13621..68787ce60f8 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -214,10 +214,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);
}