Alpha Video Training
Results 1 to 7 of 7

Thread: web app with multiple user-tables

  1. #1
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,838

    Default web app with multiple user-tables

    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.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  2. #2
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,644

    Default Re: web app with multiple user-tables

    2) Is it possible to say, have one "master" table w. fields for user_id, type (i.e. Admin, Employees or Vendors), and "table_name" field, which would have the 3rd party table names for each of teh three types. Then use xbasic to point back at the respective tables pulled from the master table?

  3. #3
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,838

    Default Re: web app with multiple user-tables

    Yeah, that makes sense. Its a bit of a drag in Dialogs where I have to determine which Group they belong to and post data both to the User's table and one of the three other User_x tables. But it would allow me to have a sequential Ulink value and keep that synchronized with Security. Maybe what I will do is put all the common fields in the main User table so I rarely have to refer to the other tables except in a Grid where it is easier to maintain.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  4. #4
    Member
    Real Name
    Ben Eilbes
    Join Date
    Jul 2009
    Posts
    3

    Default Re: web app with multiple user-tables

    Did you figure out how to do the multiple user log-in because I need that exact same thing... Please inform

  5. #5
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,838

    Default Re: web app with multiple user-tables

    This is a really old post, so you might describe in more detail what you need to do.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  6. #6
    Member
    Real Name
    Ben Eilbes
    Join Date
    Jul 2009
    Posts
    3

    Default Re: web app with multiple user-tables

    Ok.. I have successfully created 3 tables for my database.. One for my Students, one for my Facility Owners, and One for the tests that the students take.

    What I need to do is create three seperate log-in components using the three seperate tables. and it would seem that I can only use one. For example I would like the Students to be able to log-in using their user name and password... and then the facility managers should be able to log-in using their user name and password. Then Our administrators or Teachers should be able to log-in using their username and passoword. I would pay you for your advice I need this like yesterday.

    BEN

  7. #7
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,838

    Default Re: web app with multiple user-tables

    There is no need for multiple user tables for different user types. Each user type can belong to a Security Group which determines what they have access to and how the system behaves. As far as paying to have this done, please click the IADN link below. There are 32 of the best Alpha Five developers for hire at that website.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

Similar Threads

  1. In new web security where are the "user name" tables
    By Robert Rough in forum Application Server Version 8
    Replies: 3
    Last Post: 07-03-2007, 09:04 AM
  2. Using Access tables in web app
    By Steve Wood in forum Application Server Version 8
    Replies: 1
    Last Post: 04-12-2007, 08:14 AM
  3. Replies: 8
    Last Post: 02-12-2007, 03:43 PM
  4. Desktop app to web app?
    By Huey in forum Alpha Five Version 7
    Replies: 1
    Last Post: 03-19-2006, 09:02 PM
  5. Converting your APP to a Web App
    By Dave Wilson in forum Alpha Five Version 6
    Replies: 4
    Last Post: 09-22-2004, 11:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •