RE: [Phplib-users] persisten sessions
Brought to you by:
nhruby,
richardarcher
|
From: Taylor, S. <Ste...@uk...> - 2001-10-02 15:54:44
|
You need to create a user session using the User class (user.inc).
The User class works in much the same way as Session, apart from the data is
referenced using a users userid rather than a randomly generated session id.
e.g.
modify prepend.php to include "user.inc"
// define your user session class
class Your_User_Session extends User {
var $classname = "Your_User_Session";
var $magic = "myhovercraftisfulloffeels";
var $that_class = "Same_As_Your_Session_Class"; // or create a
separate storage
//class + table if
desired
var $fallback_mode = "get";
var $allowcache="no";
}
// index.php
page_open(array(
"sess"=>"Your_Session",
"auth"=>"Your_Auth",
"user"=>"Your_User_Session"
));
// Now $user object exists that works the as $sess
$user->register(.......
....
page_close();
-Stewart
-----Original Message-----
From: Andres Baravalle [mailto:and...@li...]
Sent: 02 October 2001 16:28
To: php...@li...
Subject: [Phplib-users] persisten sessions
Hi,
I would like to have persistent sessions. Let's say, I would like that
someone that comes to my site and comes back in less than 10 days, can have
same variables registered than last time he accessed the site (some way
like amazon). If he doesn't clear his cookies, of course.
I have my session class in session.inc with
var $lifetime = 14400;
but every time I connect to the site I get a new session, instead of
resuming old one. Other session features work well in te site. I'm using
authentication, db classes and session variables with success.
Something pointing me to right direction could be enought.
Thanks in advance,
Andres
_______________________________________________
Phplib-users mailing list
Php...@li...
https://lists.sourceforge.net/lists/listinfo/phplib-users
|