signup_blog example

$result     = validate_user_form();
    $user_name  = $result['user_name'];
    $user_email = $result['user_email'];
    $errors     = $result['errors'];

    if ( $errors->has_errors() ) {
        signup_user( $user_name$user_email$errors );
        return false;
    }

    if ( 'blog' === $_POST['signup_for'] ) {
        signup_blog( $user_name$user_email );
        return false;
    }

    /** This filter is documented in wp-signup.php */
    wpmu_signup_user( $user_name$user_emailapply_filters( 'add_signup_meta', array() ) );

    confirm_user_signup( $user_name$user_email );
    return true;
}

/** * Shows a message confirming that the new user has been registered and is awaiting activation. * * @since MU (3.0.0) * * @param string $user_name The username. * @param string $user_email The user's email address. */
Home | Imprint | This part of the site doesn't use cookies.