ClassicPress logo
Skip to content
Filter by type:

Browse:

  • Home
  • Functions
  • validate_user_signup()

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->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;
}

Expand Source Code View on GitHub


Related

Uses

Uses
Uses Description
wp-signup.php: signup_blog()

Shows a form for a user or visitor to sign up for a new site.

wp-signup.php: confirm_user_signup()

Shows a message confirming that the new user has been registered and is awaiting activation.

wp-signup.php: validate_user_form()

Validates user sign-up name and email.

wp-signup.php: signup_user()

Shows a form for a visitor to sign up for a new user account.

wp-signup.php: add_signup_meta

Filters the new default site meta variables.

wp-includes/plugin.php: apply_filters()

Calls the callback functions that have been added to a filter hook.

wp-includes/ms-functions.php: wpmu_signup_user()

Records user signup information for future activation.

Show 2 more uses Hide more uses

Changelog

Changelog
Version Description
MU (3.0.0) Introduced. MU (3.0.0)
ClassicPress Documentation • Made with ClassicPress
Privacy Policy