PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Email Address Being Rejecte as Username

  1. Hi there,

    On a multisite network I manage, I was just notified by a blog owner that users cannot register to their blog. I checked and it seems valid email addresses are being rejected as a username saying it needs to have only lowercase letters and numbers. WordPress itself does not enforce that policy as it makes no sense whatsoever anyway (email addresses are ideal usernames) and it worked before. I don't have a plugin enforcing such a policy either.

    So I tested and reverted back version 1.4 of the User Registration addon and things work normally again.

    Is there a specific reason version 1.5 now rejects email addresses as usernames? To me that is a bug as there's no reason I can think of that would justify this and this major change is also not mentioned in the 1.5 changelog that I can see.


    Posted 11 years ago on Monday April 29, 2013 | Permalink
  2. David Peralty

    You are correct about changes in 1.5.

    There were changes made with this version to use the WordPress validation, which explains why you can no longer use the email address as the username.

    To get around this, you can use the gform_user_registration_validation hook and do your own validation on the field and/or update the existing validation of the field in the form object to be successful.

    Posted 11 years ago on Monday April 29, 2013 | Permalink
  3. Hi David,

    I think I need a little more help. I looked at that page and the example is not close to what I need to do. All I want to do is make sure the value entered in the email field is a valid email address and that it is not empty. I guess GF does this validation by default anyway. Then I just need the user registration addon to let the email be used as the username or not reject it because it contains characters other than letters and numbers. Can you point me to an closer example of this or give me additional info that pushes me in the right direction. From that link you gave me I have no idea where to even begin other than create the filter. I have no idea what code should go into it.


    Posted 11 years ago on Sunday May 12, 2013 | Permalink
  4. Hi again,

    Any information anyone can provide to help point me in the right direction? Thanks!

    Posted 11 years ago on Wednesday May 15, 2013 | Permalink
  5. Hi Stephane,

    Could you give me a couple examples of email addresses used as usernames that are failing for you?

    Posted 11 years ago on Thursday May 16, 2013 | Permalink
  6. I'd love to implement this as well... Any luck?

    Posted 11 years ago on Wednesday June 12, 2013 | Permalink

This topic has been resolved and has been closed to new replies.