Skip to:
Content

BuddyPress.org

Ticket #2207: 2207.02.patch

File 2207.02.patch, 979 bytes (added by boonebgorges, 13 years ago)
  • bp-members/bp-members-signup.php

    diff --git bp-members/bp-members-signup.php bp-members/bp-members-signup.php
    index 89b28b9..9d8eeda 100644
    function bp_core_validate_user_signup( $user_name, $user_email ) { 
    307307        if ( empty( $user_name ) )
    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();
    315312
    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
    321318        if( strlen( $user_name ) < 4 )