Re: AUTH: multiple directories in site each with it's own login -> cross-directory authentication is happening
| From: | l Burnerheimerton | Date: | Tue, 04 Oct 2005 19:08:02 +0000 |
| Subject: | Re: AUTH: multiple directories in site each with it's own login -> cross-directory authentication is happening | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21228@lists.php.net to get a copy of this message | ||
--- Alvin Tan <inscribe@gmail.com> wrote:
> I'm a little curious on the code you used for the
> original AUTH. Can you
> post a bit of that or tell me where I can get some
> examples? The ones on the
> Pear site don't seem to work well for me, especially
> trying to
> register_session.
>
> Thanks.
>
> On 10/4/05, l Burnerheimerton
> <lburnerheimerton@yahoo.com> wrote:
> >
> > > Justin Patrin
> >
> > Sorry - I added session_start() ABOVE the code I
> used
> > and it worked fine. It's amazing what you mis
> after a
> > day or staring at the screen!
> >
> > Thanks.
> >
> >
> >
> >
> >
>
______________________________________________________
> > Yahoo! for Good
> > Donate to the Hurricane Katrina relief effort.
> > http://store.yahoo.com/redcross-donate3/
> >
> > --
> > PEAR General Mailing List (http://pear.php.net/)
> > To unsubscribe, visit:
> http://www.php.net/unsub.php
this is form the documentation and I included where
you might add session variables
<?php
require_once "Auth.php";
function loginFunction()
{
/*
* Change the HTML output so that it fits to your
* application.
*/
echo "<form method=\"post\" action=\"test.php\">";
echo "<input type=\"text\" name=\"username\">";
echo "<input type=\"password\"
name=\"password\">";
echo "<input type=\"submit\">";
echo "</form>";
}
$dsn = "mysql://user:password@localhost/database";
$a = new Auth("DB", $dsn, "loginFunction");
$a->start();
if ($a->checkAuth()) {
HERE IS WHERE YOU WOULD ADD TO YOUR SESSION
VARIABLES
}
?>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com