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: https://develop.svn.wordpress.org/trunk@4693 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-01-07 07:52:57 +00:00
parent 85892d3aab
commit c1cc3d6dc7
1 changed files with 1 additions and 1 deletions

View File

@ -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 ))