Forums / General / How to remove notifications from all users?
zurgutt -
Monday 02 November 2009 12:39:55 pm
Anyone knows how to remove notification subscription from all users who have managed to click on button before cronjob was set up? I have cleared the notificationevent table but want to remove old registrations too.
Its a deathtrap btw, it should not be possible to subscribe before that cronjob is set up, managed to kill the job when only few hundred was sent out, there was thousands in queue.. I hope that button is not there in forum anymore in 4.2?
EDIT: it seems clearing ezsubtree_notification_rule table should help, let me know if this could create any problems.
Certified eZ developer looking for projects. zurgutt at gg.ee
Romain Petit
Saturday 07 November 2009 4:03:42 am
Hi,
Subscription date is not stored, you have no way to filter notification rules by subscription date.
PS :You should not manually accessing tables, you may be able to remove all notifications by doing something like that :
$db = eZDB::instance(); $rows = $db->arrayQuery('SELECT DISTINCT content_object_id FROM ezuser WHERE 1'); foreach( $rows as $row ) { eZSubtreeNotificationRule::removeByUserID($row['content_object_id']); }
Good luck !