wp-valid-username-normalizer

This plugin will clean up the mess when your user database is full av invalid usernames.

Author:Alfred Godoy, Klandestino AB (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:3.4.2
Plugin version:1.0
Added to WordPress repository:09-10-2012
Last updated:09-10-2012
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:80
Rated by:1
Plugin URI:http://code.google.com/p/wp-valid-username-no...
Total downloads:853
Active installs:10+
plugin download
Click to start download

WordPress functions for creating new users does not check wheather the usernames are valid (for having in URL:s etc.) So, if you have a wordpress site with some plugin that creates users with "funny characters" (such as spaces, national characters, etc.), this plugin will clean up the mess. (Yes, this is a real world scenario that did happen.)

This plugin will rename all your user's usernames to something valid, still allowing your users to continue logging in with their old invalid username, so you do not have to instruct all your users to login in with the new valid username. This plugin will map old invalid usernames to the new valid ones.

Overall, what is considered a "valid" username is a bit of a mess in WordPress. You would expect the sanitize_user() function to return a username that works, but it does accept spaces, wildcard and at (@), which all will fuck up your authors' archives URLs in WordPress. However, when creating new users in the wordpress admin, those characters are NOT valid. So, wordpress itself is not consistent on what is valid.

This plugin will only accept lower case a-z and 0-9. All other usernames will be rewritten.

The plugin also handles potential username conflicts, so you do not have to worry about dupes in the database after installing this plugin.