Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/20/2012 06:09:48 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Use correct field when in username compatibility mode in bp_core_set_uri_globals(). See #4028.

File:
1 edited

Legend:

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

    r5810 r5811  
    202202    if ( empty( $matches ) && bp_core_enable_root_profiles() ) {
    203203
     204        // Switch field based on compat
     205        $field = bp_is_username_compatibility_mode() ? 'login' : 'slug';
     206
    204207        // Make sure there's a user corresponding to $bp_uri[0]
    205         if ( !empty( $bp->pages->members ) && !empty( $bp_uri[0] ) && $root_profile = get_user_by( 'login', $bp_uri[0] ) ) {
     208        if ( !empty( $bp->pages->members ) && !empty( $bp_uri[0] ) && $root_profile = get_user_by( $field, $bp_uri[0] ) ) {
    206209
    207210            // Force BP to recognize that this is a members page
Note: See TracChangeset for help on using the changeset viewer.