I am having a problem implementing Pear::Auth with Smarty.
My login
is working to the extent that I can put in valid information
and it
will let me through. But, after providing valid
credentials, I'm
just presented with a blank screen. I have to refresh the
page to
see the content. Unfortunately, I'm new to Pear::Auth, too.
And,
I'm not finding a lot of documentation on it.
I would very much appreciate some help with this.
Here's some code snippets (I'll try to provide enough, but
not too
much):
(index.php)
if($homepage->checkAuth())
$homepage->displayLinks($homepage->getEntriesByCategor
y());
else
$homepage->displayLogin();
(mylibrary.php)
function displayLinks($data) {
// -- tpl is an instance of Homepage_Smarty which extends
Smarty.
// -- $data in an array that my template parses
$this->tpl->assign('link', $data);
$this->tpl->display('index.tpl');
}
function displayLogin() {
/* show the authorization form */
$this->auth->start();
$this->tpl->display('index.tpl');
}
getEntriesByCategory() {
// this returns an array of results from a SQL query
// I don't think it important to this
}
TIA,
Darren
____________________________________________________________
________________________
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo!
Games.
http://games.yahoo
.com/games/front
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|