Date: 03/23/01
- Next message: Joerg Behrens: "Re: [phplib] logout link only when logged in"
- Previous message: fabrizio.ermini <email protected>: "Re: [phplib] logout link only when logged in"
- In reply to: Adi Sieker: "[phplib] logout link only when logged in"
- Next in thread: Joerg Behrens: "Re: [phplib] logout link only when logged in"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Hi,
>
> I thought this would be a simple task but I can't seem to find an
> elegant way todo this, or I haven't gotten my head around the phplib
> enough yet.
> I want to display a logout link on all pages off my website when a
> user is authenticated. Also on pages that _don't_ require
> authentication. What is the most elegant way of doing this with
> phplib?
>
>From the manual.
A session is authenticated if it contains
if($auth->auth["uid"] != false and time() < $auth->auth["exp"])
{
echo '<a href="logout.php">Logout</a>';
}
or change false to "nobody" if you're using default authentication
HTH
M@
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Joerg Behrens: "Re: [phplib] logout link only when logged in"
- Previous message: fabrizio.ermini <email protected>: "Re: [phplib] logout link only when logged in"
- In reply to: Adi Sieker: "[phplib] logout link only when logged in"
- Next in thread: Joerg Behrens: "Re: [phplib] logout link only when logged in"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

