Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • riverthia

    (@riverthia)

    Ok. I get it. The bug is in private_group_enforce_permissions() function (/wp-content/plugins/bbp-private-groups/includes/functions.php:line 109)
    The header() calls must be followed by exit; statement. This is my version

    function private_group_enforce_permissions() {
    global $rpg_settingsf ;
    // Bail if not viewing a bbPress item
    if (!is_bbpress())
    return;

    // Bail if not viewing a single item or if user has caps
    if (!is_singular() || bbp_is_user_keymaster() )

    return;

    if (!private_groups_check_can_user_view_post()) {
    if (!is_user_logged_in()) {
    if($rpg_settingsf[‘redirect_page2’]) {
    $link=$rpg_settingsf[‘redirect_page2’] ;
    // header( “Location: $link” );
    wp_redirect($link);
    exit;
    }
    else {
    auth_redirect();
    }
    }
    else {
    if($rpg_settingsf[‘redirect_page1’]) {
    $link=$rpg_settingsf[‘redirect_page1’] ;
    // header( “Location: $link” );
    wp_redirect($link);
    exit;
    }
    else {
    bbp_set_404();
    }

    }
    }
    }

    riverthia

    (@riverthia)

    the same issue for guests, 404 not found when forum is set to private / visible when public with a private group assigned

Viewing 2 replies - 1 through 2 (of 2 total)