Proper usages of Pear Auth::setExpire and Auth::setIdle
| From: | bclem at imaginative-enterprises dot com | Date: | Mon, 10 May 2004 20:59:18 +0000 |
| Subject: | Proper usages of Pear Auth::setExpire and Auth::setIdle | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-12403@lists.php.net to get a copy of this message | ||
Hi All,
I'd like to set the authorization expiration and idle time for each session,
but I'm a bit confused about when I'd call those functions.
Right now, I have an include file called 'auth.php' which does the following.
require_once "Auth/Auth.php";
function loginFunction() {
header('location: login.php');
}
if (isset($_GET['login']) && $_GET['login'] == 1) {
$optional = true;
} else {
$optional = false;
}
$dsn = "mysql://lentesta:p5142d13@localhost:3306/test";
$a = new Auth("DB",$dsn,"loginFunction", $optional);
$a->start();
?>
When should I call the setExpire and setIdle functions? Do I set it before the
start() function is called? or after?
Thanks,
Brent