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

February 12, 2011 


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