Summery Summery
Checks whether a username is valid.
Syntax Syntax
Parameters Parameters
- $username
-
(Required) Username.
Return Return
(bool) Whether username given is valid
Source Source
File: wp-includes/user.php
return $user->ID; } return false; } /** * Checks whether a username is valid. * * @since 2.0.1 * @since 4.4.0 Empty sanitized usernames are now considered invalid * * @param string $username Username. * @return bool Whether username given is valid */
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Empty sanitized usernames are now considered invalid |
2.0.1 | Introduced. |