Hi all!
I'm using the latest WPMU for a closed website. We're using Buddypress on it and don't want outsiders in.
I've handled this using two steps.
1. Secure the website by using this code in the header:
<?php if(!is_user_logged_in()){
nocache_headers();
header("HTTP/1.1 302 Moved Temporarily");
header('Location: ' . get_settings('siteurl') . '/wp-signup.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));
header("Status: 302 Moved Temporarily");
exit();
} ?>
That way, only registered users who are logged in gets in and can see any part of the website.
2. How to get new registrants?
I've used the plugin Secure Invites. This plugin let's current users invite others by adding their email to a list. The new registrant gets an invite email and is allowed to signup.
BUT!
When the user gets the email invite to register they're unable to reach the website because of the security code in the header (shown above).
I've tried to solve this by adding a second blog (which is the primary blog) which is the only one beeing secure/closed. The "front blog" doesn't have the code on the header shown above. Using this strategy allows the user to register but not to active his/her account. Then the user is stopped again by the security code.
Does anyone have any suggestions on how to solve this? I've tried talking to the plugin-creator and I've tried hiring a good coder but they haven't been able to solve this particular scenario.
I haven't been able to solve this for months so any help would be very appreciated! I'm willing to pay to have this solved.
Thanks for listening!
Tore