bp_blogs_remove_user_from_blog
Remove a blog-user pair from BP's blog tracker.
Description
Parameters (2)
- 0. $user_id (int)
- ID of the user whose blog is being removed.
- 1. $blog_id — Optional. (int)
- ID of the blog being removed. Default: current blog ID.
Usage
if ( !function_exists( 'bp_blogs_remove_user_from_blog' ) ) { require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-functions.php'; } // ID of the user whose blog is being removed. $user_id = -1; // Optional. ID of the blog being removed. Default: current blog ID. $blog_id = -1; // NOTICE! Understand what this does before running. $result = bp_blogs_remove_user_from_blog($user_id, $blog_id);
Defined (1)
The function is defined in the following location(s).
- /bp-blogs/bp-blogs-functions.php
- function bp_blogs_remove_user_from_blog( $user_id, $blog_id = 0 ) {
- global $wpdb;
- if ( empty( $blog_id ) ) {
- $blog_id = $wpdb->blogid;
- }
- bp_blogs_remove_blog_for_user( $user_id, $blog_id );
- }