Make WordPress Core


Ignore:
Timestamp:
05/03/2010 11:46:42 PM (16 years ago)
Author:
ryan
Message:

Fix user validation feedback. Props sivel. fixes #13162

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/user.php

    r14422 r14428  
    159159                $user->user_pass = $pass1;
    160160
    161         if ( !$update && !validate_username( $user->user_login ) )
    162                 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid. Please enter a valid username.' ));
     161        if ( !$update && isset( $_POST['user_login'] ) && !validate_username( $_POST['user_login'] ) )
     162                $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ));
    163163
    164164        if ( !$update && username_exists( $user->user_login ) )
Note: See TracChangeset for help on using the changeset viewer.