bp_blogs_remove_data( int $user_id )

Remove all blog associations for a given user.


Parameters Parameters

$user_id

(int) (Required) ID whose blog data should be removed.


Top ↑

Return Return

(bool) Returns false on failure.


Source Source

File: bp-blogs/bp-blogs-functions.php

function bp_blogs_remove_data( $user_id ) {
	if ( !is_multisite() )
		return false;

	/**
	 * Fires before all blog associations are removed for a given user.
	 *
	 * @since 1.5.0
	 *
	 * @param int $user_id ID of the user whose blog associations are being removed.
	 */
	do_action( 'bp_blogs_before_remove_data', $user_id );

	// If this is regular blog, delete all data for that blog.
	BP_Blogs_Blog::delete_blogs_for_user( $user_id );

	/**
	 * Fires after all blog associations are removed for a given user.
	 *
	 * @since 1.0.0
	 *
	 * @param int $user_id ID of the user whose blog associations were removed.
	 */
	do_action( 'bp_blogs_remove_data', $user_id );
}


Top ↑

User Contributed Notes User Contributed Notes

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