authentication advice

Codes here !

Moderators: macek, egami, gesf

faust
New php-forum User
New php-forum User
Posts: 109
Joined: Thu May 03, 2012 7:22 am

authentication advice

Postby faust » Sun Jun 10, 2012 5:52 am

I'm building a cms and I need to create different user accounts (admin, client, super user etc.). I don't need code or anything just if someone can tell me if i'm thinking this the right way. I was thinking of creating 2 tables (ex. USERS and GROUPS). GROUPS will be only id, and group_title and USERS will be id, user, pass, group_id. On login or pages with sensitive info I would check if the user is in the right group. Am I going the right way? Thanks :)

User avatar
ejsexton82
New php-forum User
New php-forum User
Posts: 86
Joined: Mon Jun 04, 2012 10:05 pm
Location: Ankara, Turkey
Contact:

Re: authentication advice

Postby ejsexton82 » Mon Jun 11, 2012 6:00 am

That sounds like it could work. Some people take it a step further and create a PRIVILEGES table linked to the GROUPS table. If you go that route, you would check if the user has the right privilege.


Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 1 guest