From c1cc3d6dc7a3969dbe9628c787cb4a53d808354c Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Sun, 7 Jan 2007 07:52:57 +0000 Subject: [PATCH] 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 --- wp-admin/admin-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 07766f9db8..c119813d6b 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -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', __( 'ERROR: This username is invalid. Please enter a valid username.' )); if (!$update && username_exists( $user->user_login ))