OAuth / OpenID Connect

How to allow chinese (or any latin) keywords in WP username?

321 views 3

To allow the special characters in the WordPress Username, add the below lines in the functions.php file of your theme.

add_filter(‘sanitize_user’, ‘non_strict_login’, 10, 3);
function non_strict_login( $username, $raw_username, $strict ) {
     if( !$strict )
        return $username;
     return sanitize_user(stripslashes($raw_username), false);
}

Was this helpful?


Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com