Date: 04/20/01
- Next message: Bas van Schooten: "Re: [phplib] PHPLib installing"
- Previous message: Chris Johnson: "RE: [phplib] users"
- In reply to: Faine, Mark: "[phplib] users"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
on 4/20/01 8:58 AM, Faine, Mark at Mark.Faine <email protected> wrote:
> It seems to me that auth_user should contain more than the few fields. I
> need to be able to recall user information such as address, first name, last
> name, phone number, etc. The usual information, nowhere is this implemented,
> I know I could create yet another table but I have 3 or 4 already it's
> getting hard to keep track of them and this seems a little messy.
>
> Should I extend the auth_user table to include the information I need or
> make yet another table or what? I'm just looking for suggestions on best
> possible implementation, how have you guys done it?
>
> -Mark
>
You say user, but you're referring to the auth_user table that is used by
the auth class. Perhaps you are confused? The auth class should be used
for authentication, the user class is for storing persistent user specific
data that should span over several sessions.
Remember that user is just a wrapper around session with no gc_lifetime
(data exists till you delete it.. gc does work in user.. but you don't
really want it to do stuff ... do set it as per the doc's to 0).
page_open(array("sess" => "MySess",
"auth" => "MyAuth",
"user" => "MyUser"));
$userStuff = array('name' => 'Nathan',
'address' => 'Somewhere USA',
'email' => 'somewhere <email protected>');
$user->register("userStuff");
page_close();
$userStuff[] will now be available on any page that calls the MyUser
subclass in page_open();
The user class will default to storing it's data in the session table;
however, I would re-import the sessions table into the db as another table
(with a different name) and specify that table name in your subclass of
user, it's neater and a bit more reliable, IMHO.
[On a side note, adding a "email" field to the auth_user table would be a
good thing for emailing forgotten passwords to users... since in theory we
can't get to the user data to cull that info without having to manually
reimport the data from the db]
-n
-- ...... nathan hruby - nhruby <email protected> computer support specialist department of drama and theatre http://www.drama.uga.edu/ ......--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Bas van Schooten: "Re: [phplib] PHPLib installing"
- Previous message: Chris Johnson: "RE: [phplib] users"
- In reply to: Faine, Mark: "[phplib] users"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

