[buddypress-trac] [BuddyPress Trac] #6681: Delete all of a user's notifications after they're deleted

buddypress-trac noreply at wordpress.org
Thu Oct 22 22:04:28 UTC 2015


#6681: Delete all of a user's notifications after they're deleted
---------------------------------------+-----------------------------
 Reporter:  henry.wright               |      Owner:
     Type:  enhancement                |     Status:  new
 Priority:  normal                     |  Milestone:  Awaiting Review
Component:  Component - Notifications  |    Version:  2.3.3
 Severity:  normal                     |   Keywords:
---------------------------------------+-----------------------------
 Some notifications seem to remain in the database after a user is deleted.
 I don't see a reason to keep them? Even custom notifications added by
 plugins could get the chop:

 {{{
 function example_func( $user_id ) {
     $where = array(
         'user_id' => $user_id,
         'item_id' => false,
         'secondary_item_id' => false,
         'component_action' => false,
         'component_name' => false
     );
     BP_Notifications_Notification::delete( $where );
 }
 add_action( 'delete_user', 'example_func' );
 // More hooks needed here to cover the various ways users can be deleted.
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6681>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list