is_user_spammy

Advertisement

Summery Summery

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

Syntax Syntax

is_user_spammy( string|WP_User $user = null )

Parameters Parameters

$user

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

Default value: null

Return Return

(bool)

Source Source

File: wp-includes/ms-functions.php

 */
function add_new_user_to_blog( $user_id, $password, $meta ) {
	if ( ! empty( $meta['add_to_blog'] ) ) {
		$blog_id = $meta['add_to_blog'];
		$role    = $meta['new_role'];
		remove_user_from_blog( $user_id, get_network()->site_id ); // Remove user from main blog.

		$result = add_user_to_blog( $blog_id, $user_id, $role );

		if ( ! is_wp_error( $result ) ) {
			update_user_meta( $user_id, 'primary_blog', $blog_id );

Advertisement

Changelog Changelog

Changelog
Version Description
MU (3.0.0) Introduced.

Advertisement

Leave a Reply