validate_user_form example

<?php }

/** * Validates the new user sign-up. * * @since MU (3.0.0) * * @return bool True if new user sign-up was validated, false on error. */
function validate_user_signup() {
    $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 );
        
Home | Imprint | This part of the site doesn't use cookies.