/**
 * Validate the new user signup
 *
 * @since MU
 *
 * @return bool True if new user signup was validated, false if error
 */
function validate_user_signup()
{
    $result = validate_user_form();
    $user_name = $result['user_name'];
    $user_email = $result['user_email'];
    $errors = $result['errors'];
    if ($errors->get_error_code()) {
        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_email, apply_filters('add_signup_meta', array()));
    confirm_user_signup($user_name, $user_email);
    return true;
}
示例#2
0
/**
 * Validate the new user signup
 *
 * @since MU
 *
 * @uses validate_user_form() to retrieve an array of the user data
 * @uses wpmu_signup_user() to signup the new user
 * @uses confirm_user_signup() to confirm the new user signup
 * @return bool True if new user signup was validated, false if error
 */
function validate_user_signup()
{
    $result = validate_user_form();
    extract($result);
    if ($errors->get_error_code()) {
        signup_user($user_name, $user_email, $errors);
        return false;
    }
    if ('blog' == $_POST['signup_for']) {
        signup_blog($user_name, $user_email);
        return false;
    }
    //duplicate_hook
    wpmu_signup_user($user_name, $user_email, apply_filters('add_signup_meta', array()));
    confirm_user_signup($user_name, $user_email);
    return true;
}
示例#3
0
function validate_user_signup()
{
    $result = validate_user_form();
    extract($result);
    // list_hooked_functions();
    if ($errors->get_error_code()) {
        signup_user($user_name, $user_email, $errors);
        return false;
    }
    if ('blog' == $_POST['signup_for']) {
        signup_blog($user_name, $user_email);
        return false;
    }
    echo "<h1>" . $user_email . "</h1>";
    wpmu_signup_user($user_name, $user_email, apply_filters("add_signup_meta", array()));
    confirm_user_signup($user_name, $user_email);
    return true;
}