Advertisements

is_user_spammy

Definition:
function is_user_spammy( $username = 0 ) {}

Check to see whether a user is marked as a spammer, based on username

Parameters

  • string $username

Source code

function is_user_spammy( $username = 0 ) {

	if ( $username == 0 ) {

		$user_id = get_current_user_id();

	} else {

		$user_id = get_user_id_from_string( $username );

	}

	$u = new WP_User( $user_id );



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

}

2225

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: