skip to Main Content

Can two different type of users (driver and passenger) sign up using the same email address as I want user can login as driver or passenger or they can be both using the same email address.

i have tried to attempt but failed message occur saying the email has been associated by other user

3

Answers


  1. Nope, emails are meant to be primary key, hence they cannot be associated with multiple account.

    Login or Signup to reply.
  2. This all depends with you database structure. If you use the same table for all users and email as unique, they cant. If you use different tables for each user type, they can.
    You can change the email to be not unique or use different tables. A great solution would be to allow multiple profiles under parent profile. User logs in with an email, then creates a profile(driver/passenger), the same way you can create several profiles of facebook from your parent account.

    Login or Signup to reply.
  3. Users and roles may be better stored in separate tables。Otherwise, there may be many similar problems with use-related attributes later on。

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search