WordPress.org

Make WordPress Core

Ticket #17793: 17793.2.diff

File 17793.2.diff, 1.9 KB (added by MikeHansenMe, 6 years ago)

same just refreshed

  • wp-admin/includes/user.php

     
    135135                $user->user_pass = $pass1;
    136136
    137137        if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) )
    138                 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ));
     138                $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. Usernames may contain only letters (a-z), numbers (0-9), dashes (-), underscores (_), and periods (.).' ));
    139139
    140140        if ( !$update && username_exists( $user->user_login ) )
    141141                $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ));
  • wp-login.php

     
    312312        if ( $sanitized_user_login == '' ) {
    313313                $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
    314314        } elseif ( ! validate_username( $user_login ) ) {
    315                 $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
     315                $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username. Usernames may contain only letters (a-z), numbers (0-9), dashes (-), underscores (_), and periods (.).' ) );
    316316                $sanitized_user_login = '';
    317317        } elseif ( username_exists( $sanitized_user_login ) ) {
    318318                $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );