During my site's signup process three inserts in separate tables occur to setup a new account:
- INSERT INTO User
- INSERT INTO Profile
- INSERT INTO ProfileSetup
Currently, if a failure occurs at any point in the process, I kill the program and notify the user that an error has occurred. If a failure occurs on step 3 for whatever reason, technically the user account and profile are live and the user could log in, likely resulting in major problems. Not a good first impression.
I'm wondering what the best way to handle this is? If step 3 fails should I go back and delete the records created in step 1 and 2?