|
Posted by klenwell on 09/28/07 20:50
I'm in the process of refactoring the php code base I've amassed over
the last few years into an object-oriented framework. I'm about to
start in on the authentication/login extension and I've been thinking
about different approaches to the mysql table schema that stores basic
user login information. At present, user authentication is keyed to a
table with the following columns:
TABLE: basic_user
uid - int [primary]
handle - varchar [unique]*
email - varchar [unique]
password - varchar
access_lvl - tinyint
acct_status - tinyint
confirm_key - varchar
confirmed_timestamp - int
created_timestamp - int
* handle (user name) is optional -- email address alternatively can be
used as the handle
My strategy is to keep this table as minimal as possible and define it
as a kind of constant or standard for the framework. Then, other
tables can be created on a project-by-project basis to link to this
table and expand a user's information, if necessary. (Two examples
would be a profile table for expanding user profile info and an
activity log table to track user activity.)
I was interested in hearing some of the views of others who have
tackled this issue and how you've addressed it. Are there other
columns you like to include in your basic user table? What's your
table schema like?
Tom
Navigation:
[Reply to this message]
|