validate_user_signup() WordPress Function
The validate_user_signup() function is used to validate the user signup form data. It checks the form data for errors and returns an error message if there are any problems.
validate_user_signup() #
Validates the new user sign-up.
Return
(bool) True if new user sign-up was validated, false on error.
Source
File: wp-signup.php
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 ); 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; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
MU (3.0.0) | Introduced. |