Sanitize username stripping out unsafe characters.
If $strict is true, only alphanumeric characters plus these: _, space, ., -, *, and @ are returned.
Removes tags, octets, entities, and if strict is enabled, will remove all non-ASCII characters. After sanitizing, it passes the username, raw username (the username in the parameter), and the strict parameter as parameters for the sanitize_user filter.
<?php sanitize_user( $username, $strict ) ?>
$strictparameter and sanitize_user filter added in 2.0.1
sanitize_user() is located in
sanitize_user() is in a class of functions that help you sanitize potentially unsafe data which allow you to pass an arbitrary variable and receive the clean version based on data type. Others include: