Make WordPress Core


Ignore:
Timestamp:
09/14/2015 02:44:41 AM (11 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/pluggable.php

    r34052 r34107  
    16681668 * @since 2.7.0
    16691669 *
    1670  * @param object $user User Object
    1671  */
    1672 function wp_password_change_notification(&$user) {
     1670 * @param WP_User $user User object.
     1671 */
     1672function wp_password_change_notification( $user ) {
    16731673        // send a copy of password change notification to the admin
    16741674        // but check to see if it's the admin whose password we're changing, and skip this
Note: See TracChangeset for help on using the changeset viewer.