username_exists filter-hook . WP 4.9.0
Filters whether the given username exists.
Usage
add_filter( 'username_exists', 'filter_function_name_7536', 10, 2 ); function filter_function_name_7536( $user_id, $username ){ // filter... return $user_id; }
- $user_id(int|false)
- The user ID associated with the username, or false if the username does not exist.
- $username(string)
- The username to check for existence.
Changelog
Since 4.9.0 | Introduced. |
Where the hook is called
username_exists
wp-includes/user.php 1618
return apply_filters( 'username_exists', $user_id, $username );