WordPress.org

Make WordPress Core

Ticket #33336: 33336-R1-UsernameValidationString.diff

File 33336-R1-UsernameValidationString.diff, 1.1 KB (added by atomicjack, 6 years ago)

Missed a number off of the ticket ID - no actual code change from original patch

  • wp-includes/ms-functions.php

    diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php
    index edbb984..f56eca7 100644
    a b function wpmu_validate_user_signup($user_name, $user_email) { 
    471471        $user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) );
    472472
    473473        if ( $user_name != $orig_username || preg_match( '/[^a-z0-9]/', $user_name ) ) {
    474                 $errors->add( 'user_name', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) );
     474                $errors->add( 'user_name', __( 'Username can only contain lowercase letters (a-z) and numbers.' ) );
    475475                $user_name = $orig_username;
    476476        }
    477477
    function wpmu_validate_blog_signup( $blogname, $blog_title, $user = '' ) { 
    630630                $errors->add('blogname', __( 'Please enter a site name.' ) );
    631631
    632632        if ( preg_match( '/[^a-z0-9]+/', $blogname ) )
    633                 $errors->add('blogname', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) );
     633                $errors->add('blogname', __( 'Username can only contain lowercase letters (a-z) and numbers.' ) );
    634634
    635635        if ( in_array( $blogname, $illegal_names ) )
    636636                $errors->add('blogname',  __( 'That name is not allowed.' ) );