wppaste
WordPress

do_action( 'register_post', string $sanitized_user_login, string $user_email, WP_Error $errors )

Since
2.1.0
Fires when submitting registration form data, before the user is created.

Compatibility

WordPress
since 2.1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$sanitized_user_loginstring
The submitted username after being sanitized.
$user_emailstring
The submitted email.
$errorsWP_Error
Contains any errors with submitted username and email, e.g., an empty field, an invalid username or email, or an existing username or email.

Where this hook fires · 1

  • wp-includes/user.php:3606register_new_user()

Source code

	 * @param string   $sanitized_user_login The submitted username after being sanitized.	 * @param string   $user_email           The submitted email.	 * @param WP_Error $errors               Contains any errors with submitted username and email,	 *                                       e.g., an empty field, an invalid username or email,	 *                                       or an existing username or email.	 */	do_action( 'register_post', $sanitized_user_login, $user_email, $errors ); 	/**	 * Filters the errors encountered when a new user is being registered.	 *	 * The filtered WP_Error object may, for example, contain errors for an invalid	 * or existing username or email address. A WP_Error object should always be returned,

Changelog

Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.