WordPress开发者和主题制作者的搜索引擎



validate_user_signup ›

Since3.0.0
已弃用n/a
validate_user_signup ( 没有参数 )
返回:
  • (bool) True if new user signup was validated, false if error
定义在:
文档:
Change Log:
  • MU

Validate the new user signup



源码

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