WordPress.org

Make WordPress Core

Changeset 34505


Ignore:
Timestamp:
09/24/2015 05:48:10 PM (4 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/user.php

    r34251 r34505  
    108108    if ( $user->user_login == '' )
    109109        $errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ) );
    110 
     110       
     111    /* checking that nickname has been typed */
     112    if ( $update && empty( $user->nickname ) ) {
     113        $errors->add( 'nickname', __( '<strong>ERROR</strong>: Please enter a nickname.' ) );
     114    }
     115   
    111116    /* checking the password has been typed twice */
    112117    /**
Note: See TracChangeset for help on using the changeset viewer.