Skip to:
Content

Changeset 5443


Ignore:
Timestamp:
12/05/2011 06:24:04 PM (6 years ago)
Author:
boonebgorges
Message:

Removes BP's rudimentary username sanitization during registration, falling back on WordPress core functions. Fixes #2207

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-signup.php

    r5417 r5443  
    308308        $errors->add( 'user_name', __( 'Please enter a username', 'buddypress' ) );
    309309
    310     $maybe = array();
    311     preg_match( "/[a-z0-9]+/", $user_name, $maybe );
    312 
    313310    // Make sure illegal names include BuddyPress slugs and values
    314311    bp_core_flush_illegal_names();
     
    316313    $illegal_names = get_site_option( 'illegal_names' );
    317314
    318     if ( !validate_username( $user_name ) || in_array( $user_name, (array)$illegal_names ) || ( !empty( $maybe[0] ) && $user_name != $maybe[0] ) )
     315    if ( !validate_username( $user_name ) || in_array( $user_name, (array)$illegal_names ) )
    319316        $errors->add( 'user_name', __( 'Only lowercase letters and numbers allowed', 'buddypress' ) );
    320317
Note: See TracChangeset for help on using the changeset viewer.