bp_notifications_delete_notifications_on_user_delete( int $user_id )
Delete a user’s notifications when the user is deleted.
Description Description
Parameters Parameters
- $user_id
-
(Required) ID of the user who is about to be deleted.
Return Return
(int|false) The number of rows deleted, or false on error.
Source Source
File: bp-notifications/bp-notifications-functions.php
function bp_notifications_delete_notifications_on_user_delete( $user_id ) {
return BP_Notifications_Notification::delete( array(
'user_id' => $user_id,
'item_id' => false,
'secondary_item_id' => false,
'component_action' => false,
'component_name' => false,
) );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |