Skip to:
Content

BuddyPress.org

Ticket #4939: registration-error-messages-01.patch

File registration-error-messages-01.patch, 996 bytes (added by hnla, 11 years ago)

Updated registration error messages

  • bp-members/bp-members-functions.php

     
    11011101        bp_core_flush_illegal_names();
    11021102
    11031103        $illegal_names = get_site_option( 'illegal_names' );
     1104       
     1105        if( in_array( $user_name, (array) $illegal_names ) )
     1106        $errors->add( 'user_name', __( 'That Username is a reserved name, please choose another.', 'buddypress' ) );
     1107       
     1108        if ( !validate_username( $user_name ) )
     1109                $errors->add( 'user_name', __( 'Please use only letters, numbers, ., -, *, and @ in usernames', 'buddypress' ) );
    11041110
    1105         if ( !validate_username( $user_name ) || in_array( $user_name, (array) $illegal_names ) )
    1106                 $errors->add( 'user_name', __( 'Only lowercase letters and numbers allowed', 'buddypress' ) );
    1107 
    11081111        if( strlen( $user_name ) < 4 )
    11091112                $errors->add( 'user_name',  __( 'Username must be at least 4 characters', 'buddypress' ) );
    11101113