summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-29 15:05:47 +0200
committerJoas Schilling <coding@schilljs.com>2016-09-29 15:40:53 +0200
commit4d1acfd4ef7087b8dc7795396c75fd239a6245f4 (patch)
tree8b51beb4ea63495900ed844bab0e529ec493cc09 /lib
parentf6ff60f4cb3800e5e7937fc18d62b99342fb7727 (diff)
downloadnextcloud-server-4d1acfd4ef7087b8dc7795396c75fd239a6245f4.tar.gz
nextcloud-server-4d1acfd4ef7087b8dc7795396c75fd239a6245f4.zip
Only trigger postDelete hooks when the user was deleted...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/User/User.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 11c0cc8649a..68787ce60f8 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -218,10 +218,10 @@ class User implements IUser {
$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));
+ if ($this->emitter) {
+ $this->emitter->emit('\OC\User', 'postDelete', array($this));
+ }
}
return !($result === false);
}