Skip to:
Content

BuddyPress.org

Changeset 2035


Ignore:
Timestamp:
10/05/2009 06:49:27 PM (15 years ago)
Author:
apeatling
Message:

Added a username compatibility mode setting that will allow LDAP login usernames that use dots to work with BP 1.1. Add define( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE', true ); to your wp-config.php to enable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r2015 r2035  
    534534    $ud = get_userdata($user_id);
    535535   
     536    if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) )
     537        $username = $ud->user_login;
     538    else
     539        $username = $ud->user_nicename;
     540   
    536541    /* If we are using a members slug, include it. */
    537542    if ( !defined( 'BP_ENABLE_ROOT_PROFILES' ) )
    538         return apply_filters( 'bp_core_get_user_domain', $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/' . $ud->user_nicename . '/' );
     543        return apply_filters( 'bp_core_get_user_domain', $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/' . $username . '/' );
    539544    else
    540         return apply_filters( 'bp_core_get_user_domain', $bp->root_domain . '/' . $ud->user_nicename . '/' );       
     545        return apply_filters( 'bp_core_get_user_domain', $bp->root_domain . '/' . $username . '/' );       
    541546}
    542547
Note: See TracChangeset for help on using the changeset viewer.