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.
3461*3462* @param WP_Error$errorsA WP_Error object containing any errors encountered3463* during registration.3464* @param string$sanitized_user_login User's username after it has been sanitized.3465 * @param string $user_email User's email.3466*/3467$errors=apply_filters('registration_errors',$errors,$sanitized_user_login,$user_email);34683469if($errors->has_errors()){3470return$errors;3471}34723473$user_pass=wp_generate_password(12,false);
History
Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.