Even with a maximum value of +1, there is still ID coverage


I have a unique ID (NabejanID) for each user in my service.
As you can see in the captcha, the first user registration form is automatically set to the maximum value + 1, but often the IDs are covered and I have to manually modify the database.

Does anyone have a solution?

You can rely on the user:id that will always be unique, it will save you actions, and will always work.

Otherwise, I would move that +1 onto an action on another screen, once the user is signed up and logged in. You need to allow time for such operations otherwise you’ll face these issues. You can’t rely on stacking them straight after the signup or login process. :+1:

As per your comment, I have changed the method to use IDs to create unique IDs.
Changed to 1110001000+ID to match NabejanID’s input rule rules.

Thank you very much!

1 Like

Great :+1:
Glad I could help.

1 Like