Re: All site data visible to members and non-members alike
I would say privacy is probably the most complex feature to implement – as far away from simple as you can get.
If you want to just close off your site to users who are not logged in, then there are plenty of plugins you can use. Or you can just use the following code in your plugins directory, smartypants:
<?php
/*
Plugin Name: BuddyPress Lockdown
Plugin URI: https://buddypress.org/
Description: Lock down your BuddyPress site if a user is not logged in.
Author: Andy Peatling
Version: 1.0
Author URI: https://buddypress.org/
Site Wide Only: true
*/
function bp_lockdown() {
global $bp;
if ( BP_REGISTER_SLUG != $bp->current_component && 'wp-login.php' != $bp->current_component && !is_user_logged_in() )
bp_core_redirect( site_url( 'wp-login.php' ) );
}
add_action( 'bp_init', 'bp_lockdown' );
?>