locked
Creating a New Member RRS feed

  • Question

  • User-1941296693 posted

    Hi,

    I've decided I wish to create a guest sign up on the site (just for speedier checkout, and new member would probably never use this account again or be sent a username & password), they wouldn't be aware that they had created an account.

    I'd like to use the createuser method to create a membership account.

    However the site requires a unique username and unique email.

    So there may be a scenario that the same user orders multiple times with the same email. This wouldn't work as the web.config requires a unique email.

    1) Can I bypass creating a unique email

    2) Can I generate a unique username

    3) Can I just generate a unique password

    Does this sound feasible? Any help would be great.

    thanks.

    Saturday, August 30, 2014 11:12 AM

Answers

  • User-760709272 posted

    Having a system work for both known users and anonymous users is always a little tricky.  Especially if your order table have referential integrity to your user table.  If you do have a link between the tables you could create a single anonymous user and always use that user's ID for entries in the order table etc, and I'd introduce the concept of a userid and a basketid.  Each known user has a basket and the basket is linked to the known user, but anon users also have a unique basket id, but there is no associated user id (or they all have the same user id of the anon user)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 31, 2014 7:09 AM

All replies

  • User-760709272 posted

    Don't bother making temporary users, just store in the session somewhere that it is an "anonymous" user, or take the fact that they're not authenticated as being that they are anonymous.  So if they are authenticated you can get the name\address etc, store their order against the user and so on, if they're anonymous then store the data such that you can tie it back to a payment, but that doesn't need tied to a user.  It all depends what you need to store and why you need them to be authenticated...but the general idea is to code for both authenticated and anonymous users rather than creating temporary accounts.

    Saturday, August 30, 2014 11:23 AM
  • User-1941296693 posted

    Hi AidyF, for some reason I thought of creating a temporary user so that I wouldn't have to run 2 systems.

    At the moment there is 1 orders table, that requires a userID (which is a unique identifier).

    I guess I could autgenerate a GUID for the userID, and use this in the orders table.

    Does that sound the way to go?

    Saturday, August 30, 2014 11:11 PM
  • User-760709272 posted

    Having a system work for both known users and anonymous users is always a little tricky.  Especially if your order table have referential integrity to your user table.  If you do have a link between the tables you could create a single anonymous user and always use that user's ID for entries in the order table etc, and I'd introduce the concept of a userid and a basketid.  Each known user has a basket and the basket is linked to the known user, but anon users also have a unique basket id, but there is no associated user id (or they all have the same user id of the anon user)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 31, 2014 7:09 AM
  • User-1941296693 posted

    ok plenty of food for thought.

    I was thinking of just generating a guid for userID for the orders table, and not having referential integrity between the orders and user table. Simplest way to do it in my opinion.

    Tuesday, September 2, 2014 4:04 AM