Changeset 35008
- Timestamp:
- 10/10/2015 01:21:30 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/user.php
r34534 r35008 126 126 do_action_ref_array( 'check_passwords', array( $user->user_login, &$pass1, &$pass2 ) ); 127 127 128 if ( $update ) {129 if ( empty($pass1) && !empty($pass2) )130 $errors->add( 'pass', __( '<strong>ERROR</strong>: You entered your new password only once.' ), array( 'form-field' => 'pass1' ) );131 elseif ( !empty($pass1) && empty($pass2) )132 $errors->add( 'pass', __( '<strong>ERROR</strong>: You entered your new password only once.' ), array( 'form-field' => 'pass2' ) );133 } else {134 if ( empty($pass1) )135 $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter your password.' ), array( 'form-field' => 'pass1' ) );136 elseif ( empty($pass2) )137 $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter your password twice.' ), array( 'form-field' => 'pass2' ) );138 }139 140 128 /* Check for "\" in password */ 141 129 if ( false !== strpos( wp_unslash( $pass1 ), "\\" ) ) … … 144 132 /* checking the password has been typed twice the same */ 145 133 if ( $pass1 != $pass2 ) 146 $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter the same password in the twopassword fields.' ), array( 'form-field' => 'pass1' ) );134 $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) ); 147 135 148 136 if ( !empty( $pass1 ) )
Note: See TracChangeset
for help on using the changeset viewer.