Make WordPress Core


Ignore:
Timestamp:
09/14/2015 02:44:41 AM (10 years ago)
Author:
boonebgorges
Message:

Send password-change email notifications via hook.

wp_password_change_notification() is now called at the 'after_password_reset'
action, rather than being invoked directly from the reset_password() function.

In order to make it possible to call wp_password_change_notification() as a
do_action() callback, the function signature has to be changed so that the
$user parameter is expected to be a value rather than a reference. Since
PHP 5.0, objects are passed by reference, so &$user was unnecessary anyway.

Props dshanske, thomaswm.
See #33587.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r34106 r34107  
    338338add_action( 'comment_post', 'wp_new_comment_notify_moderator', 10, 2 );
    339339add_action( 'comment_post', 'wp_new_comment_notify_postauthor' );
     340add_action( 'after_password_reset', 'wp_password_change_notification' );
    340341
    341342/**
Note: See TracChangeset for help on using the changeset viewer.