You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shisei Hanai edited this page Jun 15, 2015
·
12 revisions
Users
There are three types of users.
Super user:
Super user can do anything including administration tasks and purchasing.
Store owner:
Store owner can do some sort of administration tasks tasks and purchasing.
Buyer:
Buer can only do purchasing.
Users and database
The main table storing users is store_user table (you can see ER diagram). Store owner has a record in site_user table. The following table shows three types of users and database record.
User type
store_user record
site_user record
Super User
user_role=0
none
Store Owner
user_role=1
yes
Buyer
user_role=1
none
Employees
The application supports employee users. Sites for employees are not for everyone and need login to browse. In this case, the user id of employee should be in format "n-xxxxxx" where n is site id (surrogate key of site table).
Unregistered users
If the first_name column of store_user is left blank, the user will be redirected to user registration form when the user log in to the site.