Filters the errors encountered when a new user is being registered.
Description
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, but may or may not contain errors. If any errors are present in $errors, this will abort the user's registration.
Parameters
$errorsWP_Error
A WP_Error object containing any errors encountered during registration.
3618*3619* @param WP_Error$errorsA WP_Error object containing any errors encountered3620* during registration.3621* @param string$sanitized_user_login User's username after it has been sanitized.3622 * @param string $user_email User's email.3623*/3624$errors=apply_filters('registration_errors',$errors,$sanitized_user_login,$user_email);36253626if($errors->has_errors()){3627return$errors;3628}36293630$user_pass=wp_generate_password(12,false);
History
Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.