So you want to just redirect anyone who’s not logged in to a static homepage with only static content?
just to the home page of buddypress, like here:
http://alumnidev.com/
Hey, I have been having the same problem! I found a partial solution to this in a previous post, but it only makes certain specified ‘slugs’ private, and not the entire site. Is there anyway we can modify this code to make it privatize the whole site?
the code is located in bp-custom.php in the mu-plugins folder.
//this makes directories private
function oci_restrict_access(){
global $bp, $bp_unfiltered_uri;
if (!is_user_logged_in() &&
(BP_MEMBERS_SLUG == $bp_unfiltered_uri[0] ||
BP_FORUMS_SLUG == $bp->current_component ||
BP_GROUPS_SLUG == $bp->current_component ||
BP_HOME_BLOG_SLUG == $bp->current_component)){
bp_core_redirect( get_option('home') . "/wp-login.php" );
}
}
add_action( 'wp', 'oci_restrict_access', 3 );
any help would be great!
Thanks..I’ll try this (and hope it works in BP 1.1. Without being able to protect the site, as much as I like BuddyPress, its essentially worthless for use in private communities…I sure hope someone comes up with plugin for 1.1.
Hi there,
I tried login-configurator as this redirects the whole site to login page, and then you can allow whitelist URLs to pass through like /register and /activate.
I did have this working last night, but now it is not working and redirects the whitelist URLs to login.
If anybody else gives this a go I’d be interested how you get on?
Robin
Registered users only 2 doesn’t work currently with BP 1.2. It cannot handle the new way of registration from BP.
Well, I solved this by putting bp on a subblog that can only be visited by registered users. That’s one way of doing it. Thing is though, that all info can be seen if you know the exact address of the page you want to visit
@jehi: does your pligin cover this?
@ Disbas: Yes, it does.
Also google or others may search and document all of your website if not protected.