bp_friends_delete_activity_on_user_delete( int $user_id )

Deletes friendship activity items when a user is deleted.

Description

Parameters

$user_id

(Required) The ID of the user being deleted.

Source

File: bp-friends/bp-friends-activity.php

425
426
427
428
429
430
431
432
433
434
435
function bp_friends_delete_activity_on_user_delete( $user_id = 0 ) {
    if ( ! bp_is_active( 'activity' ) ) {
        return;
    }
 
    bp_activity_delete( array(
        'component'         => buddypress()->friends->id,
        'type'              => 'friendship_created',
        'secondary_item_id' => $user_id
    ) );
}

Changelog

Changelog
Version Description
BuddyPress 2.5.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.