Changeset 5301 for trunk/bp-core/bp-core-catchuri.php
- Timestamp:
- 11/08/2011 01:14:31 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r5238 r5301 238 238 239 239 // Switch the displayed_user based on compatbility mode 240 if ( bp_is_username_compatibility_mode() ) 240 if ( bp_is_username_compatibility_mode() ) { 241 241 $bp->displayed_user->id = (int) bp_core_get_userid( urldecode( $bp_uri[$uri_offset + 1] ) ); 242 else242 } else { 243 243 $bp->displayed_user->id = (int) bp_core_get_userid_from_nicename( urldecode( $bp_uri[$uri_offset + 1] ) ); 244 245 if ( empty( $bp->displayed_user->id ) ) { 244 } 245 246 if ( !bp_displayed_user_id() ) { 247 246 248 // Prevent components from loading their templates 247 249 $bp->current_component = ''; … … 253 255 // If the displayed user is marked as a spammer, 404 (unless logged- 254 256 // in user is a super admin) 255 if ( !empty( $bp->displayed_user->id ) && bp_core_is_user_spammer( $bp->displayed_user->id) ) {257 if ( bp_displayed_user_id() && bp_core_is_user_spammer( bp_displayed_user_id() ) ) { 256 258 if ( is_super_admin() ) { 257 259 bp_core_add_message( __( 'This user has been marked as a spammer. Only site admins can view this profile.', 'buddypress' ), 'error' );
Note: See TracChangeset
for help on using the changeset viewer.