| 123 | | if ( $update ) { |
| 124 | | if ( empty($pass1) && !empty($pass2) ) |
| 125 | | $errors->add( 'pass', __( '<strong>ERROR</strong>: You entered your new password only once.' ), array( 'form-field' => 'pass1' ) ); |
| 126 | | elseif ( !empty($pass1) && empty($pass2) ) |
| 127 | | $errors->add( 'pass', __( '<strong>ERROR</strong>: You entered your new password only once.' ), array( 'form-field' => 'pass2' ) ); |
| 128 | | } else { |
| 129 | | if ( empty($pass1) ) |
| 130 | | $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter your password.' ), array( 'form-field' => 'pass1' ) ); |
| 131 | | elseif ( empty($pass2) ) |
| 132 | | $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter your password twice.' ), array( 'form-field' => 'pass2' ) ); |
| 133 | | } |
| 134 | | |