WordPress.org

Make WordPress Core

Ticket #24617: 24617.01.patch

File 24617.01.patch, 946 bytes (added by r-a-y, 5 years ago)
  • wp-login.php

    function retrieve_password() { 
    212212                $user_data = get_user_by('login', $login);
    213213        }
    214214
     215        // check if user is a spammer
     216        if ( is_multisite() && $user_data->spam ) {
     217                $errors->add( 'spammer_account', __( '<strong>ERROR</strong>: Your account has been marked as a spammer.' ) );
     218        }
     219
    215220        do_action('lostpassword_post');
    216221
    217222        if ( $errors->get_error_code() )
    function retrieve_password() { 
    229234        do_action('retreive_password', $user_login);  // Misspelled and deprecated
    230235        do_action('retrieve_password', $user_login);
    231236
    232         $allow = apply_filters('allow_password_reset', true, $user_data->ID);
     237        $allow = apply_filters( 'allow_password_reset', true, $user_data->ID, $user_data );
    233238
    234239        if ( ! $allow )
    235240                return new WP_Error('no_password_reset', __('Password reset is not allowed for this user'));