Skip to:
Content

BuddyPress.org

Changeset 839


Ignore:
Timestamp:
01/12/2009 11:22:32 PM (16 years ago)
Author:
apeatling
Message:

Fixes #311

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r815 r839  
    3030    global $current_userid;
    3131    global $is_member_page, $is_new_friend;
     32    global $bp_unfiltered_uri;
    3233   
    3334    $path = apply_filters( 'bp_uri', $_SERVER['REQUEST_URI'] );
     
    7980   
    8081    /* Reset the keys by merging with an empty array */
    81     $bp_uri = array_merge( array(), $bp_uri ); 
     82    $bp_uri = array_merge( array(), $bp_uri );
     83    $bp_unfiltered_uri = $bp_uri;
    8284
    8385    /* Catch a member page and set the current member ID */
     
    210212
    211213function bp_core_catch_no_access() {
    212     global $bp, $bp_path, $bp_no_status_set;
     214    global $bp, $bp_path, $bp_unfiltered_uri, $bp_no_status_set;
    213215
    214216    // If bp_core_redirect() and $bp_no_status_set is true,
     
    216218    if ( $bp_no_status_set )
    217219        return false;
    218    
    219     // If this user does not exist, redirect them to their own profile.
    220     // if ( !$bp['current_userid'] )
    221     //  bp_core_redire( $bp['loggedin_domain'] ); die;
     220
     221    // If this user does not exist, redirect to the root domain.
     222    if ( !$bp['current_userid'] && $bp_unfiltered_uri[0] == MEMBERS_SLUG && isset($bp_unfiltered_uri[1]) )
     223        bp_core_redirect( $bp['root_domain'] );
    222224
    223225    if ( !$bp_path && !bp_is_blog_page() ) {
Note: See TracChangeset for help on using the changeset viewer.