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.


Top ↑

Return Return

(int|false) The number of rows deleted, or false on error.


Top ↑

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,
	) );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.