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:
parent
85892d3aab
commit
c1cc3d6dc7
|
@ -497,7 +497,7 @@ function edit_user( $user_id = 0 ) {
|
||||||
if (!empty ( $pass1 ))
|
if (!empty ( $pass1 ))
|
||||||
$user->user_pass = $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.' ));
|
$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid. Please enter a valid username.' ));
|
||||||
|
|
||||||
if (!$update && username_exists( $user->user_login ))
|
if (!$update && username_exists( $user->user_login ))
|
||||||
|
|
Loading…
Reference in New Issue