Correctly present an error to the user if the nickname field is empty when updating a user profile. It's strange that this field is required, but it is, so be it.
Fixes #33310 Props prasad-nevase, metodiew Built from https://develop.svn.wordpress.org/trunk@34505 git-svn-id: http://core.svn.wordpress.org/trunk@34469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bc5eb3a623
commit
41edf2bc22
|
@ -107,7 +107,12 @@ function edit_user( $user_id = 0 ) {
|
|||
/* checking that username has been typed */
|
||||
if ( $user->user_login == '' )
|
||||
$errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ) );
|
||||
|
||||
|
||||
/* checking that nickname has been typed */
|
||||
if ( $update && empty( $user->nickname ) ) {
|
||||
$errors->add( 'nickname', __( '<strong>ERROR</strong>: Please enter a nickname.' ) );
|
||||
}
|
||||
|
||||
/* checking the password has been typed twice */
|
||||
/**
|
||||
* Fires before the password and confirm password fields are checked for congruity.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34504';
|
||||
$wp_version = '4.4-alpha-34505';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue