wp_authenticate_spam_check
For Multisite blogs, check if the authenticated user has been marked as a spammer, or if the user's primary blog has been marked as spam.
Description
(WP_User|WP_Error) wp_authenticate_spam_check( (WP_User|WP_Error|null) $user );
Returns (WP_User|WP_Error)
WP_User on success, WP_Error if the user is considered a spammer.
Parameters (1)
Usage
if ( !function_exists( 'wp_authenticate_spam_check' ) ) { require_once ABSPATH . WPINC . '/user.php'; } // WP_User or WP_Error object from a previous callback. Default null. $user = null; // NOTICE! Understand what this does before running. $result = wp_authenticate_spam_check($user);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/user.php
- function wp_authenticate_spam_check( $user ) {
- if ( $user instanceof WP_User && is_multisite() ) {
- /**
- * Filters whether the user has been marked as a spammer.
- *
- * @since 3.7.0
- *
- * @param bool $spammed Whether the user is considered a spammer.
- * @param WP_User $user User to check against.
- */
- if ( $spammed )
- }
- return $user;
- }