Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Robcwright…I added to the code to fix the problem with logged out users or users who aren’t members of private groups being kicked back to the home page when they click on the name of a private group:

    function redirect_to_forum() {
    global $bp;

    $path = clean_url( $_SERVER );

    $path = apply_filters( ‘bp_uri’, $path );

    if ($bp->groups->current_group->user_has_access === true) {

    if ( bp_is_group_home() && strpos( $path, $bp->bp_options_nav ) === false ) {
    if( $bp->bp_options_nav )
    bp_core_redirect( $path . $bp->bp_options_nav . ‘/’ );
    }
    }
    }
    add_action( ‘wp’, ‘redirect_to_forum’ );

    This checks to see if the user has access before redirecting to the forum page as the home page. The function is found in bp_groups.php , line 187.

Viewing 1 replies (of 1 total)
Skip to toolbar