From 704fd72623ebdc99da7fbb00ccf30f26672d8ec5 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 4 Feb 2009 17:25:30 +0000 Subject: Delete subscriptions when a user is deleted --- modules/notification/helpers/notification_event.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/notification/helpers') diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php index 6336733a..22a810bf 100644 --- a/modules/notification/helpers/notification_event.php +++ b/modules/notification/helpers/notification_event.php @@ -45,4 +45,9 @@ class notification_event_Core { notification::send_comment_published($new); } } + + static function user_before_delete($user) { + $db = Database::instance(); + $db->query("DELETE FROM subscriptions WHERE `user_id` = $user->id;"); + } } -- cgit v1.2.3