Make WordPress Core

Ticket #20107: ms-functions.diff

File ms-functions.diff, 898 bytes (added by hughwillfayle, 14 years ago)

Diff for #20107

  • ms-functions.php

     
    458458        if ( is_email_address_unsafe( $user_email ) )
    459459                $errors->add('user_email',  __('You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider.'));
    460460
    461         if ( strlen( $user_name ) < 4 )
    462                 $errors->add('user_name',  __('Username must be at least 4 characters'));
     461        if ( strlen( $user_name ) < apply_filters( 'wpmu_user_name_length', 4 ) )
     462                $errors->add( 'user_name',  __( sprintf( 'Username must be at least %d characters', apply_filters( 'wpmu_user_name_length', 4 ) ) ) );
    463463
    464464        if ( strpos( ' ' . $user_name, '_' ) != false )
    465465                $errors->add( 'user_name', __( 'Sorry, usernames may not contain the character &#8220;_&#8221;!' ) );