illegal_user_logins
This filter is documented in wp-includes/user.php.
Description
Parameters (1)
- 0. $array (array) =>
array()
- Array of blacklisted usernames.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'illegal_user_logins', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the illegal_user_logins callback
- function filter_illegal_user_logins( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'illegal_user_logins', 'filter_illegal_user_logins', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'illegal_user_logins', 'filter_illegal_user_logins', 10, 1 );
Defined (5)
The filter is defined in the following location(s).
- /wp-includes/user.php
- $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
- $illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );
- /wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
- $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
- /wp-includes/ms-functions.php
- $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
- /wp-admin/includes/user.php
- $illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );