is_user_spammy() – Check to see whether a user is marked as a spammer, based on user login.

You appear to be a bot. Output may be restricted

Description

Determines whether a user is marked as a spammer, based on user login.

Usage

$bool = is_user_spammy( $user );

Parameters

$user
( string|WP_User ) optional – Optional. Defaults to current user. WP_User object, or user login name as a string.

Returns

bool

Source

File name: wordpress/wp-includes/ms-functions.php
Lines:

1 to 11 of 11
function is_user_spammy( $user = null ) {
  if ( ! ( $user instanceof WP_User ) ) {
    if ( $user ) {
      $user = get_user_by( 'login', $user );
    } else {
      $user = wp_get_current_user();
    }
  }

  return $user && isset( $user->spam ) && 1 == $user->spam;
}
 

 View on GitHub View on Trac