Changeset 5235 for trunk/bp-core/bp-core-catchuri.php
- Timestamp:
- 10/11/2011 02:05:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r5227 r5235 251 251 } 252 252 253 // If the displayed user is marked as a spammer, 404 (unless logged- 254 // in user is a super admin) 255 if ( !empty( $bp->displayed_user->id ) && bp_core_is_user_spammer( $bp->displayed_user->id ) ) { 256 if ( is_super_admin() ) { 257 bp_core_add_message( __( 'This user has been marked as a spammer. Only site admins can view this profile.', 'buddypress' ), 'error' ); 258 } else { 259 bp_do_404(); 260 return; 261 } 262 } 263 253 264 // Bump the offset 254 265 if ( isset( $bp_uri[$uri_offset + 2] ) ) { … … 368 379 if ( $bp_no_status_set ) 369 380 return false; 370 371 // If the displayed user was marked as a spammer and the logged-in user is not a super admin, 404.372 if ( isset( $bp->displayed_user->id ) && bp_core_is_user_spammer( $bp->displayed_user->id ) ) {373 if ( !$bp->loggedin_user->is_super_admin ) {374 bp_do_404();375 return;376 377 } else {378 bp_core_add_message( __( 'This user has been marked as a spammer. Only site admins can view this profile.', 'buddypress' ), 'error' );379 }380 }381 381 382 382 if ( !isset( $wp_query->queried_object ) && !bp_is_blog_page() ) {
Note: See TracChangeset
for help on using the changeset viewer.