Skip to:
Content

BuddyPress.org

Changeset 3675


Ignore:
Timestamp:
01/08/2011 08:11:48 PM (11 years ago)
Author:
boonebgorges
Message:

Prevents BP from stripping spaces from usernames for existing users, to prevent user_nicename clashes. Fixes #2642. Props jfarthing84

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r3666 r3675  
    17601760 */
    17611761function bp_core_strip_username_spaces( $username ) {
     1762        // Don't alter the user_login of existing users, as it causes user_nicename problems.
     1763        // See http://trac.buddypress.org/ticket/2642
     1764        if ( username_exists( $username ) && ( !defined( 'BP_ENABLE_USER_COMPATIBILITY_MODE' ) || !BP_ENABLE_USER_COMPATIBILITY_MODE ) )
     1765                return $username;
     1766               
    17621767    return str_replace( ' ', '-', $username );
    17631768}
Note: See TracChangeset for help on using the changeset viewer.