Re: [phplib] logout link only when logged in From: Joerg Behrens (behrens <email protected>)
Date: 03/23/01

Moin,

From: "Adi Sieker" <adi <email protected>>
> 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?

I`ll use the 'var $nobody = true;' in the auth class and then ...

if($auth->auth["uid"] == "nobody"){
    // show login button
}
else {
    // show logout button
}

Joerg Behrens

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>