Hi This is more of a best practice question. I would like to know recommendations on how to handle guest users in a webapp. Lets say I have an ecommerce store, where a user is allowed to shop around and add items to shopping cart without logging in (authz). Now how should I maintain the data this user generates. In my one of my current apps I have a separate temp_user table but it ofcourse makes things messy in the sense now my order table has two types of users, one for orders with logged in users and one for users who are not logged in.
Should we instead have just one single user table and create an entry for a guest user in it whenever required. For eg lets say when a user adds something to the shopping cart then we just create a user entry for this user in the background with a guest role and log him in and then proceed with the action. How could this logic be possibly centralized. For eg there may still be certain actions that require a higher role. For eg we may want payments to be made only after signups. Any suggestions? Also wouldn't this add a lot of temporary user rows to the user table ? Thanks in advance Animesh
