Make WordPress Core

Ticket #25853: 25853.patch

File 25853.patch, 919 bytes (added by dcavins, 10 years ago)

Adds user_login and WP_User object to 'retrieve_password_message' filter

  • src/wp-login.php

    diff --git src/wp-login.php src/wp-login.php
    index fd97572..aadcc2e 100644
    function retrieve_password() { 
    389389         *
    390390         * @since 2.8.0
    391391         *
    392          * @param string $message Default mail message.
    393          * @param string $key     The activation key.
     392         * @param string        $message                Default mail message.
     393         * @param string        $key                    The activation key.
     394         * @param string        $user_login             The username for the user.
     395         * @param WP_User       $user_data      WP_User object.
    394396         */
    395         $message = apply_filters( 'retrieve_password_message', $message, $key );
     397        $message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data );
    396398
    397399        if ( $message && !wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) )
    398400                wp_die( __('The e-mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') );