Re: Auth::setExpire

From: Date: Thu, 12 Jun 2003 22:27:56 +0000
Subject: Re: Auth::setExpire
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5923@lists.php.net to get a copy of this message
I just tried it out, setIdle() works the way I expected setExpire to work from the documentation. Now to get logout() to work.... --Richard On 12 Jun 2003 at 16:30, Graham Clarke wrote: > I've got the same problem. Found below in AUTH.php & will try it > out today. > > Let me know if it works for you. > > Graham > > > /** > * Maximum time of idleness in seconds > * > * The difference to $expire is, that the idletime gets * > refreshed each time, checkAuth() is called. If this * > variable is set to 0, idle time is never checked. * * @var > integer * @see setIdle(), checkAuth() */ > var $idle = 0; > > At 11:03 AM 6/12/2003 -0700, you wrote: > >I am a newby to both PHP and to the Auth package, so please > >forgive me if I am doing something stupid. > > > >I am trying to get expirations to work such that as long as a > >user is actively working, their session will stay alive, but if > >they go for a set time without doing anything their session will > >time out. > > > >I have successful set an initial expire time, but I cannot for > >the life of me get it to reset or extend that time. > > > >Here is the code I am currently using: > > > >$dsn = "pgsql://$dbuser:$dbpass@$dbhost/$dbname"; > > > >$params = array( > > "dsn" => $dsn, > > "table" => "staff", > > "usernamecol" => "id", > > "passwordcol" => "password" > > ); > > > >$myauth = new Auth("DB", $params, "loginFunction"); > >$myauth->setExpire(30, true); > >$myauth->start(); > > > >if ($myauth->getAuth()) { > > echo "<html>\n"; > > echo "<body>\n"; > > echo "You have been authenticated successfully"; > > echo "</body>\n"; > > echo "</html>\n"; > >} > > > > > >I have tried using the setExpire both with and without the add > >parameter and see no difference in how it works. > > > >I also found that if the setExpire is after the start() it seems > >to have no effect at all. > > > >Thanks for any help. > > > >--Richard > >------------------------------ > >Richard B. Pyne, NZ7K > >rpyne@kinfolk.org > >http://pyne.kinfolk.org/rbp2 > > > > > > > >-- > >PEAR General Mailing List (http://pear.php.net/) > >To unsubscribe, visit: http://www.php.net/unsub.php > > > Graham Clarke > GrahamC@53Tech.com > www.53Tech.com > 603.643.9955 > > ------------------------------ Richard B. Pyne, NZ7K rpyne@kinfolk.org http://pyne.kinfolk.org/rbp2

« previous php.pear.general (#5923) next »