diff options
Diffstat (limited to 'modules/notification/helpers')
-rw-r--r-- | modules/notification/helpers/notification_event.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/notification/helpers/notification_event.php b/modules/notification/helpers/notification_event.php index 22a810bf..66aa52c8 100644 --- a/modules/notification/helpers/notification_event.php +++ b/modules/notification/helpers/notification_event.php @@ -47,7 +47,8 @@ class notification_event_Core { } static function user_before_delete($user) { - $db = Database::instance(); - $db->query("DELETE FROM subscriptions WHERE `user_id` = $user->id;"); + ORM::factory("subscription") + ->where("user_id", $user->id) + ->delete_all(); } } |