From 4d1acfd4ef7087b8dc7795396c75fd239a6245f4 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 29 Sep 2016 15:05:47 +0200 Subject: Only trigger postDelete hooks when the user was deleted... Signed-off-by: Joas Schilling --- lib/private/User/User.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/private/User/User.php') 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); } -- cgit v1.2.3