diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-04 17:25:30 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-04 17:25:30 +0000 |
commit | 704fd72623ebdc99da7fbb00ccf30f26672d8ec5 (patch) | |
tree | 2635253d49d127f1fa95e82794da21d5f58501ab | |
parent | 98bbf53657b63030abe19881a642cac955e8765b (diff) |
Delete subscriptions when a user is deleted
-rw-r--r-- | modules/notification/helpers/notification_event.php | 5 |
1 files changed, 5 insertions, 0 deletions
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;"); + } } |