wpmu_validate_user_signup

SummerySummery

Sanitize and validate data required for a user sign-up.

Syntax

wpmu_validate_user_signup( string $user_name, string $user_email )

DescriptionDescription

Verifies the validity and uniqueness of user names and user email addresses, and checks email addresses against admin-provided domain whitelists and blacklists.

The ‘wpmu_validate_user_signup’ hook provides an easy way to modify the sign-up process. The value $result, which is passed to the hook, contains both the user-provided info and the error messages created by the function. ‘wpmu_validate_user_signup’ allows you to process the data in any way you’d like, and unset the relevant errors if necessary.

ParametersParameters

$user_name

(string) (Required) The login name provided by the user.

$user_email

(string) (Required) The email provided by the user.

ReturnReturn

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

SourceSource

File: wp-includes/ms-functions.php


			

ChangelogChangelog

Changelog
Version Description
MU (3.0.0) Introduced.
Scroll to Top