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.
3559*3560* @param WP_Error$errorsA WP_Error object containing any errors encountered3561* during registration.3562* @param string$sanitized_user_login User's username after it has been sanitized.3563 * @param string $user_email User's email.3564*/3565$errors=apply_filters('registration_errors',$errors,$sanitized_user_login,$user_email);35663567if($errors->has_errors()){3568return$errors;3569}35703571$user_pass=wp_generate_password(12,false);
History
Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.