How to use email address as username

It would seem that usernames are required in order to use the user registration add on. I am planning on allowing people to only login with their email address and password. While attempting to create a new account, I was told usernames can only be lowercase and contain letters a-z. So the @ sign in an email address does not work for usernames.

Anyone know a way around this?

Hi Dere. You can use the gform_username filter to assign a random username:

The individual will be able to log in with their email address, and never need to know the username. (That is how we handle Gravity Forms registrations for this site: - I just registered an account with my name and email address, and I was assigned this username: user5f75159820ff0695856545).

1 Like

This won’t auto-send the new user an email with their username? That would be awesome if it didn’t!

It’s worth a try (I used a fake email address, so I did not receive a notification.) If necessary, and the username is included, you could use a filter to modify the notification so that it does not send the username.

I’m going to try this right now.

I use a single line text field and map that field to the username field via the user registration tab. I added the function to functions.php but every time I attempt to create an account it says enter a username.

Does the name field actually have to be a native name field?

I also tried this by mapping the email field as the username in user registration. I get the same response, please add a username.

@chrishajer you know a way around having to use the name field? Lol. Kind of at a loss here. I add the snippet but something isn’t quite adding up. This would be a really nice solution if I can get it to work. It’s strange though the last time I tested the sign up form I can’t recall having this issue.