Date: 08/23/01
- Next message: Layne Weathers: "RE: [phplib] Installation of PHPLIB"
- Previous message: John Lucas: "[phplib] Installation of PHPLIB"
- Maybe in reply to: giancarlo pinerolo: "[phplib] stuff in the $sess->auth[] array"
- Next in thread: giancarlo pinerolo: "Re: [phplib] stuff in the $sess->auth[] array"
- Reply: giancarlo pinerolo: "Re: [phplib] stuff in the $sess->auth[] array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I used to dump a bunch of stuff in the $sess->auth[] array thinking that it
would be more efficient if I didn't do a SQL query at the top of each page
to load user information such as first name, last name, email, etc.
Inevitably I would need something else from the user record and would end up
having to do the query anyway. Also, if any of that information changed, I
would have to update both the $sess->auth array and the database. Because of
that, I don't use it anymore and have never regretted the decision.
bpopp - bpopp.net
-----Original Message-----
From: giancarlo pinerolo [mailto:giancarlo <email protected>]
Sent: Thursday, August 23, 2001 11:23 AM
To: phplib <email protected>; phplib-users
Subject: [phplib] stuff in the $sess->auth[] array
You know you can put all sort of stuff under there, under the
$sess->auth[] array.
It will last as much as your session, even less if you set an expire for
auth, so it will not be persistent. But next login can be reloaded..
And it will be visible, if you'll use php4 default session, which gets
stored in /tmp as a csv file..
So my question is:
what could you reasonably think to put there?
Someone wrote an extension to stock ACL permissions on objects that
would be stored there.
Others place the user full name and surname, or email.
In fact it can be an easy shortcut to defining a User class, and using
that instead. And can save some I/O as everything stays just in the
session record..
So one may think it is OK to store there things as 'how many more
salamis I can buy at discount price' or, for the vicious, 'list of
tables where I am authorized to gamble a free fiche'.
Missing guidelines for that. And this leads to more uncompatible auths.
I myself only recently realized that Auth and User were not
inter-dependent, so always coupled Auth with User, let Auth almost
untouched, and put stuff I needed into User.
- Gian
-- Abbestellen mit Mail an: phplib-unsubscribe <email protected> Kommandoliste mit Mail an: phplib-help <email protected>-- Abbestellen mit Mail an: phplib-unsubscribe <email protected> Kommandoliste mit Mail an: phplib-help <email protected>
- Next message: Layne Weathers: "RE: [phplib] Installation of PHPLIB"
- Previous message: John Lucas: "[phplib] Installation of PHPLIB"
- Maybe in reply to: giancarlo pinerolo: "[phplib] stuff in the $sess->auth[] array"
- Next in thread: giancarlo pinerolo: "Re: [phplib] stuff in the $sess->auth[] array"
- Reply: giancarlo pinerolo: "Re: [phplib] stuff in the $sess->auth[] array"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

