Make WordPress Core

Ticket #57317: 57317.patch

File 57317.patch, 1.3 KB (added by jenilk, 2 years ago)
  • includes/user.php

     
    173173        }
    174174
    175175        // Checking the password has been typed twice the same.
    176         if ( ( $update || ! empty( $pass1 ) ) && $pass1 != $pass2 ) {
     176        if ( ( $update || ! empty( $pass1 ) ) && $pass1 !== $pass2 ) {
    177177                $errors->add( 'pass', __( '<strong>Error:</strong> Passwords do not match. Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) );
    178178        }
    179179
     
    479479
    480480        // get_user_setting() = JS-saved UI setting. Else no-js-fallback code.
    481481        if ( 'hide' === get_user_setting( 'default_password_nag' )
    482                 || isset( $_GET['default_password_nag'] ) && '0' == $_GET['default_password_nag']
     482                || isset( $_GET['default_password_nag'] ) && '0' === $_GET['default_password_nag']
    483483        ) {
    484484                delete_user_setting( 'default_password_nag' );
    485485                update_user_meta( $user_ID, 'default_password_nag', false );
     
    501501        $new_data = get_userdata( $user_ID );
    502502
    503503        // Remove the nag if the password has been changed.
    504         if ( $new_data->user_pass != $old_data->user_pass ) {
     504        if ( $new_data->user_pass !== $old_data->user_pass ) {
    505505                delete_user_setting( 'default_password_nag' );
    506506                update_user_meta( $user_ID, 'default_password_nag', false );
    507507        }