I would love to be able to use spaces in usernames, but this does not seem possible. Is there a writeup in the codex or somewhere that explains what characters are allowed and why it was restricted to that set or is it just alphas only and suck it up?
If I want users to use something other than a username with no spaces, is my only real option a plugin that allows users to login with their email addresses instead, but still requires an alpha only username at account creation?
Oh, and I am on a WPMU/network site.
You can use spaces in usernames, no problem. Several users on wordpress.org have spaces in their usernames.
Strict mode only allows these characters:
a-z0-9<space>_.-@
However WP doesn’t default to strict mode.
Now, multisite has different restrictions, and it may strip spaces there. This is because usernames are used to create independent blogs and such on multisite installs.
I don’t think there’s any official documentation about that, but you can have a look at the
sanitize_user
function inwp-includes/formatting.php
:You could hook into that function and override the default behavior with your own.