src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php 1 location
|
@@ 1100-1102 (lines=3) @@
|
| 1097 |
|
/** This filter is documented in wp-includes/user.php */ |
| 1098 |
|
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() ); |
| 1099 |
|
|
| 1100 |
|
if ( in_array( strtolower( $username ), array_map( 'strtolower', $illegal_logins ) ) ) { |
| 1101 |
|
return new WP_Error( 'rest_user_invalid_username', __( 'Sorry, that username is not allowed.' ), array( 'status' => 400 ) ); |
| 1102 |
|
} |
| 1103 |
|
|
| 1104 |
|
return $username; |
| 1105 |
|
} |
src/wp-includes/user.php 1 location
|
@@ 1474-1476 (lines=3) @@
|
| 1471 |
|
*/ |
| 1472 |
|
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() ); |
| 1473 |
|
|
| 1474 |
|
if ( in_array( strtolower( $user_login ), array_map( 'strtolower', $illegal_logins ) ) ) { |
| 1475 |
|
return new WP_Error( 'invalid_username', __( 'Sorry, that username is not allowed.' ) ); |
| 1476 |
|
} |
| 1477 |
|
|
| 1478 |
|
/* |
| 1479 |
|
* If a nicename is provided, remove unsafe user characters before using it. |