• About WordPress
    • About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register

WordPress.org

  • Showcase
  • Learn
  • Themes
  • Plugins
  • Mobile
  • Support
    • Documentation
    • Forums
  • Get Involved
    • Five for the Future
  • About
  • Blog
  • Hosting
  • Get WordPress

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Reference / Functions / validate_user_signup()

validate_user_signup()

Validate the new user signup

Contents

  • Return
  • Source
  • Related
    • Uses
  • Changelog
  • User Contributed Notes

Return #Return

(bool) True if new user signup was validated, false if error


Top ↑

Source #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 code Collapse full source code View on Trac


Top ↑

Related #Related

Uses #Uses

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

Validate user signup 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: signup_blog()

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

wp-signup.php: confirm_user_signup()

New user signup confirmation

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()

Record user signup information for future activation.

Show 2 more uses Hide more uses

Top ↑

Changelog #Changelog

Changelog
Version Description
MU (3.0.0) Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

You must log in before being able to contribute a note or feedback.

  • About
  • Blog
  • Hosting
  • Donate
  • Support
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
  • @WordPress
  • WordPress

Code is Poetry.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.