Filters the list of disallowed usernames.
$usernamesarraywp-admin/includes/user.php:205edit_user()wp-includes/ms-functions.php:500wpmu_validate_user_signup()wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php:1331WP_REST_Users_Controller::check_username()wp-includes/user.php:2336wp_insert_user()wp-includes/user.php:3572register_new_user() * Filters the list of disallowed usernames. * * @since 4.4.0 * * @param array $usernames Array of disallowed usernames. */ $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() ); if ( in_array( strtolower( $user_login ), array_map( 'strtolower', $illegal_logins ), true ) ) { return new WP_Error( 'invalid_username', __( 'Sorry, that username is not allowed.' ) ); } /*Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.