On this page
validate_user_signup(): bool
Validates the new user sign-up.
Return
bool True if new user sign-up was validated, false on error.
Source
File: wp-signup.php. View all references
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;
}
Hooks
- apply_filters( 'add_signup_meta',
array $meta ) -
Filters the new default site meta variables.
Related
Uses
| Uses | Description |
|---|---|
| validate_user_form() wp-signup.php | Validates user sign-up name and email. |
| signup_user() wp-signup.php | Shows a form for a visitor to sign up for a new user account. |
| signup_blog() wp-signup.php | Shows a form for a user or visitor to sign up for a new site. |
| confirm_user_signup() wp-signup.php | Shows a message confirming that the new user has been registered and is awaiting activation. |
| wpmu_signup_user() wp-includes/ms-functions.php | Records user signup information for future activation. |
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/validate_user_signup