Don't re-validate the username when updating the profile (as it can't be edited anyway). Props killer-g. fixes #3531
git-svn-id: http://svn.automattic.com/wordpress/trunk@4693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
05c6094a2b
commit
874234dc6f
|
@ -497,7 +497,7 @@ function edit_user( $user_id = 0 ) {
|
|||
if (!empty ( $pass1 ))
|
||||
$user->user_pass = $pass1;
|
||||
|
||||
if ( !validate_username( $user->user_login ) )
|
||||
if ( !$update && !validate_username( $user->user_login ) )
|
||||
$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid. Please enter a valid username.' ));
|
||||
|
||||
if (!$update && username_exists( $user->user_login ))
|
||||
|
|
Loading…
Reference in New Issue