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.
3526*3527* @param WP_Error$errorsA WP_Error object containing any errors encountered3528* during registration.3529* @param string$sanitized_user_login User's username after it has been sanitized.3530 * @param string $user_email User's email.3531*/3532$errors=apply_filters('registration_errors',$errors,$sanitized_user_login,$user_email);35333534if($errors->has_errors()){3535return$errors;3536}35373538$user_pass=wp_generate_password(12,false);
History
Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.