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:
markjaquith 2007-01-07 07:52:57 +00:00
parent 05c6094a2b
commit 874234dc6f
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 ))