Uses
Uses | Description |
---|---|
wp-includes/pluggable.php: get_user_by() | Retrieve user info by a given field |
wp-includes/pluggable.php: wp_get_current_user() | Retrieve the current user object. |
Check to see whether a user is marked as a spammer, based on user login.
(bool)
File: wp-includes/ms-functions.php
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; }
Version | Description |
---|---|
MU (3.0.0) | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_user_spammy