WordPress.org

Make WordPress Core

Changeset 37316


Ignore:
Timestamp:
04/27/2016 05:35:37 AM (4 years ago)
Author:
jeremyfelt
Message:

Users: Provide a full user object when checking for a spammy multisite user

is_user_spammy() falls back to the current user if one is not provided. There is no current user during authentication, so the result is always false. Pass a user to fill the void.

Adds tests for wp_authenticate_spam_check().

Props websupporter.
Fixes #36546.

Location:
trunk
Files:
1 added
1 edited

Legend:

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

    r37278 r37316  
    303303         * @param WP_User $user    User to check against.
    304304         */
    305         $spammed = apply_filters( 'check_is_user_spammed', is_user_spammy(), $user );
     305        $spammed = apply_filters( 'check_is_user_spammed', is_user_spammy( $user ), $user );
    306306
    307307        if ( $spammed )
Note: See TracChangeset for help on using the changeset viewer.