I'm not quite sure how to approach this issue:
I am creating a web application that has an invite only registration system. An admin user sends an email invitation to a user, the user clicks the link, and takes them to a page where they can create an account that has been linked to their email address.
My initial idea was to insert a row into my users
table, with the verified
column marked false
. The problem is I have username, and password as required fields and username must be unique. So I can't just insert an empty row to be filled out later.
Should I create a separate table for the invitations? What would be the best way to approach this type of scenario?
Update: The admin will enter the first name, last name, email address, and user role (permissions). So I will need to store all these things in the invitations table. I could also store date sent and update that value if the email ever needed to be re-sent.