One thing that I’m thinking/realizing is that this isn’t a perfect block like I was thinking it was supposed to be.
Here’s a snippet of the code from includes/core.php
if ( $bp_moderate == 1 && $user_ID > 0 ) {
$user = get_userdata($user_ID);
if ( 69 == $user->user_status ) {
//hide friend buttons
add_filter( 'bp_get_add_friend_button', '__return_false' );
add_filter( 'bp_get_send_public_message_button', '__return_false' );
add_filter( 'bp_get_send_message_button', '__return_false' );
//hide group buttons
add_filter( 'bp_user_can_create_groups', '__return_false' );
add_filter( 'bp_get_group_join_button', '__return_false' );
//hide activity comment buttons
add_filter( 'bp_activity_can_comment_reply', '__return_false' );
add_filter( 'bp_activity_can_comment', '__return_false' );
add_filter( 'bp_acomment_name', '__return_false' );
//redirect messages page back to profile (dont want blocked members contacting other members)
add_filter( 'bp_get_options_nav_invite', '__return_false' );
add_filter( 'bp_get_options_nav_compose', '__return_false' );
if ( $bp->current_component == 'messages' ) {
wp_redirect( $bp->loggedin_user->domain );
exit();
}
//set global to false
} else {
$bp_moderate = false;
}
}
In short, this is hiding UI elements, but not preventing access. I probably miss-communicated this at times, as I’m realizing better what this plugin does and doesn’t do.
I also think that this could be due for a change. I know I have added some code for bbPress, which is closely coupled, but separate, from BuddyPress. It uses map_meta_cap to prevent reading of the the bbPress section, and it should be able to be used with BuddyPress as well. However, I really want to get this tested and nailed down before I push up.