Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Forwarding bbPress logins to WPMU login page.

I use this on my site to login via wpmu and get redirected to bbpress:

add_action('bb_init', 'bp_redirect_registration');
function bp_redirect_registration() {
if (strpos($_SERVER['REQUEST_URI'], 'bb-login.php') !== false) {
$ref = wp_get_referer();
wp_redirect('http://ryuuko.cl/wp-login.php?redirect_to=' . urlencode($ref));
}

if (strpos($_SERVER['REQUEST_URI'], 'register.php') !== false)
wp_redirect('http://ryuuko.cl/register');

if (strpos($_SERVER['REQUEST_URI'], 'profile.php') !== false) {
if (bb_is_user_logged_in() && isset($_GET['id']) && isset($_GET['tab'])) {
$user = bb_get_current_user();
if ($_GET['tab'] == 'edit' && $_GET['id'] == $user->ID)
wp_redirect('http://ryuuko.cl/members/' . $user->user_login . '/profile/edit');
//TODO: see how to handle moderators editing user profiles

}

}
}

of course, it’s not complete yet (check out the TODO). But it works OK.

Skip to toolbar