How do I create a unique username for each member using the signup form?

Post author
Aaron Atkins

I want to add a "username" field in the sign up form. When someone enters a username and submits, I want the form to check for an identical username in the Members database. If the username is not already taken, then the form submits and creates a new user with custom field data set for username that they entered. If the username is taken, then the form doesn't submit and a prompt appears letting the user know that that username is taken. This is what happens when someone tries to create an account with an email address that is already taken. How can I duplicate that function for a custom field?

Comments

6 comments

  • Comment author
    Duncan from Memberstack
    • Official comment

    Hey Aaron 👋 Thank you for posting! 

    We have a similar post here that others have upvoted. 

    Could you tell me a bit more about why usernames are important for your project? Historically, I've seen usernames used on sites with public profiles. 

     

  • Comment author
    Aaron Atkins

    I don't need username logins though. I just want the user to create a username as a custom field in addition to their email address. I want their username to be unique, so I'd like the form to check the member database to see if that username is already taken and then let the customer know that they need to choose a different username. 

    1
  • Comment author
    Duncan from Memberstack

    Ahhh, I see! Thank you for reiterating this. 

    I don't expect us to build something like this into Memberstack for some time. With that in mind, I think custom code will be the ideal solution for you. 

    Do you have access to a developer or a budget for your project? I can try to connect you with someone. Otherwise, this might be a good job for some Make.com automations, Chat GPT, StackOverflow, etc. 

    0
  • Comment author
    Joseph Lewis

    Hi everyone, has anyone got a way for users to log in with a username instead of an email? We add all our users manually as we are pre-populating data for them, so we do not need a duplicate username checking system, we would just add the unique usernames ourselves.

    Thanks

    0
  • Comment author
    Raquel Lopez

    Sadly no, emails are used as the main id when signing up. There's no other alternative as of the moment to use a different field than email to use as a username.

    0
  • Comment author
    Joseph Lewis

    Ah that's a shame. Okay thanks anyway.

    0

Please sign in to leave a comment.