I am building a web app that has three groups of users: Admin, Employees and Vendors. Normally I build one User's table to go along with the Security Framework to hold user-specific information such as Name, Address, etc. But in this case, each of the three groups require a very different collection of information; I will have to have three tables for user-specific data.
I am fortunate that neither the Admin or Employees will be registering online, just the Vendors.
I will be using Security Framework, so of course, the login values will all be unique, but wondered what the best way is to ensure that when an Admin user is logged in, all User references point back to my user_admin.dbf, same when an Employee-User or Vendor-User is logged in. By best way, I mean the least painful and least amount of code-confusion. In the process, I have to ensure that across all three user-tables, the USERID and what I use for a ULINK value are unique.
My two thoughts are:
1) when they log in, check the Security Framework Group value, Admin, Employee or Vendor, and set a session variable that provides the appropriate user database table name. Then, if I at least keep any referenced field NAMES the same across all three user-tables, it should automatically reference the right table. This way I won't have to have a bunch of SELECT statement everywhere I need to know which user-table to hit.
2) I don't really have a number two, I was hoping you did.
I am fortunate that neither the Admin or Employees will be registering online, just the Vendors.
I will be using Security Framework, so of course, the login values will all be unique, but wondered what the best way is to ensure that when an Admin user is logged in, all User references point back to my user_admin.dbf, same when an Employee-User or Vendor-User is logged in. By best way, I mean the least painful and least amount of code-confusion. In the process, I have to ensure that across all three user-tables, the USERID and what I use for a ULINK value are unique.
My two thoughts are:
1) when they log in, check the Security Framework Group value, Admin, Employee or Vendor, and set a session variable that provides the appropriate user database table name. Then, if I at least keep any referenced field NAMES the same across all three user-tables, it should automatically reference the right table. This way I won't have to have a bunch of SELECT statement everywhere I need to know which user-table to hit.
2) I don't really have a number two, I was hoping you did.
Comment