Email addresses as usernames in WordPress Multisite

wordpress-errorIn a recent project I was trying to create new users with just their email addresses in an instance of WordPress Multisite.  To do this, I planned to use the email address as the new user’s username.  But I kept getting this error:

“only lowercase letters (a-z) and numbers are allowed”

In case you run into this problem to, there is a solution: the Network Username Restrictions Override plugin. There’s a setting in the plug to allow email addresses for usernames.  Click that and you should be good to go.

Here’s another way to solve the same problem that overrides the error that pops up if you try to use an email address as a username in WordPress Multisite.  It attaches a custom filter to the the ‘wpmu_validate_user_signup’ hook that unsets the email address error.

2 thoughts on “Email addresses as usernames in WordPress Multisite

  1. john doe

    The first plugin saved my bacon. I was using the second solution, but it stopped working. Thanks for this lifesaving article.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *