$new_user_email,
array
( 'add_to_blog' =>
get_current_blog_id(),
'new_role' =>
$_REQUEST['role'
],
) );
if ( isset( $_POST['noconfirmation'
] ) &&
current_user_can( 'manage_network_users'
) ) { $key =
$wpdb->
get_var( $wpdb->
prepare( "SELECT activation_key FROM {
$wpdb->signups
} WHERE user_login = %s AND user_email = %s",
$new_user_login,
$new_user_email ) );
$new_user =
wpmu_activate_signup( $key );
if ( is_wp_error( $new_user ) ) { $redirect =
add_query_arg( array
( 'update' => 'addnoconfirmation'
), 'user-new.php'
);
} elseif ( !
is_user_member_of_blog( $new_user['user_id'
] ) ) { $redirect =
add_query_arg( array
( 'update' => 'created_could_not_add'
), 'user-new.php'
);
} else { $redirect =
add_query_arg( array
( 'update' => 'addnoconfirmation',
'user_id' =>
$new_user['user_id'
],
),
'user-new.php'
);
} } else {