proper auth usage
| From: | Nate \(home\) | Date: | Wed, 10 Dec 2003 22:50:51 +0000 |
| Subject: | proper auth usage | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-9467@lists.php.net to get a copy of this message | ||
i'm figuring out the Auth class
let's say i want to output the loginFunction html in between top and bottom page templates, so
the login page looks like the rest of the site.
(yes i have checked the archives and don't see anything about making the output look correct.)
here's the way i figured out to do it, but it seems kludgy. please fill me in on the proper
usage.
// display top part of page
include ("top.inc");
$a = new Auth('DB', $params, 'loginFunction', true);
if ( ! $a->getAuth()) {
// loginFunction was already called if login failed, so
// display bottom part of page
include ("bottom.inc");
exit;
}
// actual page content here...
thanx!
nate