WordPress.org

Make WordPress Core

Ticket #32430: 32430.filters.diff

File 32430.filters.diff, 1.7 KB (added by johnbillion, 3 years ago)
  • src/wp-includes/user.php

     
    21442144                // If password is changing, hash it now
    21452145                $plaintext_pass = $userdata['user_pass'];
    21462146                $userdata['user_pass'] = wp_hash_password( $userdata['user_pass'] );
     2147
    21472148                /**
    2148                  * Filter to stop the sending of the password change email.
     2149                 * Filter to control whether the password change notification email gets sent.
    21492150                 *
    21502151                 * @since 4.3
    21512152                 * @see  wp_insert_user() For $user and $userdata fields.
    21522153                 *
    2153                  * @param bool Return false to not send the email.
     2154                 * @param bool  $send Whether to send the password change notification email.
    21542155                 * @param array $user The original user array.
    21552156                 * @param array $userdata The updated user array.
    2156                  *
    21572157                 */
    2158                 $send_pass_change_email = apply_filters( 'send_pass_change_email', true, $user, $userdata );
     2158                $send_pass_change_email = apply_filters( 'send_password_change_email', true, $user, $userdata );
    21592159        }
    21602160
    21612161        if ( $user['user_email'] !== $userdata['user_email'] ) {
    21622162                /**
    2163                  * Filter to stop the sending of the email change email.
     2163                 * Filter to control whether the email address change notification email gets sent.
    21642164                 *
    21652165                 * @since 4.3
    21662166                 * @see  wp_insert_user() For $user and $userdata fields.
    21672167                 *
    2168                  * @param bool Return false to not send the email.
     2168                 * @param bool  $send Whether to send the email address change notification email.
    21692169                 * @param array $user The original user array.
    21702170                 * @param array $userdata The updated user array.
    2171                  *
    21722171                 */
    21732172                $send_email_change_email = apply_filters( 'send_email_change_email', true, $user, $userdata );
    21742173        }