Changeset 5385
- Timestamp:
- 11/27/2011 04:08:51 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-buddybar.php
r5373 r5385 260 260 // depending on whether the current user is logged in 261 261 if ( is_user_logged_in() ) { 262 if ( !bp_is_my_profile() && !$bp->bp_nav[$bp->default_component]['show_for_displayed_user'] ) { 263 // This covers the edge case where the default component is 264 // a non-public tab, like 'messages' 265 if ( bp_is_active( 'activity' ) && isset( $bp->pages->activity ) ) { 266 $redirect_to = bp_displayed_user_domain() . bp_get_activity_slug(); 267 } else { 268 $redirect_to = bp_displayed_user_domain() . ( 'xprofile' == $bp->profile->id ? 'profile' : $bp->profile->id ); 269 } 270 271 $message = ''; 272 } else { 273 $message = __( 'You do not have access to this page.', 'buddypress' ); 274 $redirect_to = bp_displayed_user_domain(); 275 } 276 262 277 // Off-limits to this user. Throw an error and redirect to the displayed user's domain 263 278 bp_core_no_access( array( 264 'message' => __( 'You do not have access to this page.', 'buddypress' ),265 'root' => bp_displayed_user_domain(),279 'message' => $message, 280 'root' => $redirect_to, 266 281 'redirect' => false 267 282 ) );
Note: See TracChangeset
for help on using the changeset viewer.