wpmu_validate_user_signup filter-hookWP 3.0.0

Filters the validated user registration details.

This does not allow you to override the username or email of the user during registration. The values are solely used for validation and error handling.

Usage

add_filter( 'wpmu_validate_user_signup', 'wp_kama_wpmu_validate_user_signup_filter' );

/**
 * Function for `wpmu_validate_user_signup` filter-hook.
 * 
 * @param array $result The array of user name, email, and the error messages.
 *
 * @return array
 */
function wp_kama_wpmu_validate_user_signup_filter( $result ){

	// filter...
	return $result;
}
$result(array)

The array of user name, email, and the error messages.

  • user_name(string)
    Sanitized and unique username.

  • orig_username(string)
    Original username.

  • user_email(string)
    User email address.

  • errors(WP_Error)
    WP_Error object containing any errors found.

Changelog

Since 3.0.0 Introduced.

Where the hook is called

wpmu_validate_user_signup()
wpmu_validate_user_signup
wp-includes/ms-functions.php 586
return apply_filters( 'wpmu_validate_user_signup', $result );

Where the hook is used in WordPress

wp-includes/ms-default-filters.php 24
add_filter( 'wpmu_validate_user_signup', 'signup_nonce_check' );