 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
Dougk Smarty n00b
Joined: 12 May 2003 Posts: 1
|
Posted: Mon May 12, 2003 9:52 pm Post subject: Smarty and Auth |
|
|
does anyone know how to implement Smarty with Auth? There appears
to be a problem with sessions. Can Auth close its session? Am I wrong
about this? |
|
| Back to top |
|
toma Smarty Regular
Joined: 25 Apr 2003 Posts: 62
|
Posted: Mon May 12, 2003 9:54 pm Post subject: |
|
|
Are you referring to PEAR::Auth? If so, I've had no problems with pear::auth at all. Here's the code I use on a web site that requires authentication for every page:
// Check for logout
if ($_REQUEST['logout']) {
$a->start();
$a->logout();
session_destroy();
header("Location: $html_root");
exit();
}
// Init the session for this user and authorize.
$a->start();
if (!$a->getAuth()) {
die();
} |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|