Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Plugin: bbPress Force Login for Buddypress


_ck_
Participant

@_ck_

Untested code cleanup (just for fun – untested)

function force_login_init() {
if (!bb_is_user_logged_in() && !preg_match("/(bb-login|bb-reset-password|register|xmlrpc).php/s",$_SERVER['REQUEST_URI'])) {
nocache_headers();
header("HTTP/1.1 302 Moved Temporarily");
header("Status: 302 Moved Temporarily");
bb_safe_redirect( bb_get_uri( 'bb-login.php', null, BB_URI_CONTEXT_HEADER + BB_URI_CONTEXT_BB_USER_FORMS ) );
exit;
}
}

Good to see you Trent, don’t be a stranger!

Skip to toolbar