Usernames, Slugs, Sign Ups, Oh My

I realize there are many forum posts on this topic, but none have helped me solve my problem. I’ve found bits and pieces that are helpful, but I’ve gone delirious trying to put them all together.

I am trying to build a user publishing app where authors have unique user names that display in their bylines and direct you their user profiles. (Wattpad is a close reference example).

I would like the unique username to be confirmed at signup. I’ve read you can do this via a “Do a search for users” or use slugs. I just want to confirm my understanding at this point so far:

  • If I do a search for users, it makes sure the username is available, as long as I’ve set capitalization parameters, correct?
  • If I use slugs, I don’t need a username input on the sign up form, correct? I could have the user change their username in their settings, which could then reset the slug? And this addresses any lowercase, caps, issues?

Questions:

  1. Does the slug automatically become “signupname” and then “signupname-1, signupname-2”? If so, I’m leaning toward keeping the username input to allow more creative names.
  2. How do I set up the capitalization parameters? (I copied the “trimmed:lowercase” from someone else but not sure what it actually does). Ultimately I want the user name to be in this format: Abcde-Bcde-1 and prevent duplicates from being added.
  3. What would I set up as the condition to make the signup button not clickable if the username is not valid? My current test allowed the form to go through but did not add the user to the database.

Here are my current settings based on the info I’ve found so far.


The best approach is to use “slug” as the unique username overall. Not to mention less strenuous on workflows.

What is the slug automatically set to? Can I set it up so that it’s the sign up name input field? (maybe I should change it to two fields, first and last name)

You have to use the “Set things slug” action.

I understand that, but I have not found anything that spells out how. I assume it needs to be included it the workflow? Here’s my set up, but again, I haven’t found anything on how to assign the slug field from certain inputs, or a combination of inputs in my case (first +last).



You set the users slug AFTER they have signed up.

Is this correct?

I’m assuming I use the same action to allow users to change their username/slug? And that can be done if a user is entering a new name in a single field?
Screen Shot 2024-04-19 at 1.34.16 PM

Yes that’s correct. You’ll need to make sure they have the rights to update their slug though.

Following up with how I finally solved this for future builders. Managed to achieve: unique username check, username input that restricts spaces and special characters, and assigning the unique username as the slug without a ton of dashes

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.