signup_nonce_check() WordPress Function

The signup_nonce_check() function is used to verify the nonce value passed in the signup form. This function is important because it helps to ensure that the user who is signing up is actually the user who is supposed to be signing up.

signup_nonce_check( array $result ) #

Processes the signup nonce created in signup_nonce_fields().


Parameters

$result

(array)(Required)


Top ↑

Return

(array)


Top ↑

Source

File: wp-includes/ms-functions.php

function signup_nonce_check( $result ) {
	if ( ! strpos( $_SERVER['PHP_SELF'], 'wp-signup.php' ) ) {
		return $result;
	}

	if ( ! wp_verify_nonce( $_POST['_signup_form'], 'signup_form_' . $_POST['signup_form_id'] ) ) {
		$result['errors']->add( 'invalid_nonce', __( 'Unable to submit this form, please try again.' ) );
	}

	return $result;
}


Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More