Skip to:

BBPress Login Redirection

  • I’ve gotten BBPress/Wordpress integration working, and now I want to use BBPress to handle all login duties—I would like to make it so that when a user accesses the login link from WordPress, it redirects them back to the page they came from after they log in to BBPress. So, the user will ideally travel:

    A page [not logged in] -> BBPress bb_login.php -> Originating Page [logged in]

    This is another thread relating to redirection but it seems very outdated, I can’t find the code they reference. Redirection works splendidly whenever you are internal to BBPress, is there any way to have it work when you’re coming from an external wordpress page?

    This is kind of a re-post, my first post attempt is being held with an “Array: Voices” status, whatever that means…

Viewing 1 replies (of 1 total)
  • Update: I seem to have gotten it working, by inserting the following code directly to function bb_safe_redirect within, right before the line checking against $allowed_hosts:

    $allowed_redirects = array();

    $allowed_redirects[] = '';

    $allowed_redirects[] = '';

    $allowed_redirects[] = '';

    add_filter('allowed_redirect_hosts', 'add_allowed_redirect_hosts');

    I originally tried to do this from a plugin, as the code above is copied from a handy WordPress plugin, but I was not able to get it to work without sticking it right within the pluggable.php file. If anybody has a better suggestion, I’d love to avoid editing the core files if possible!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.