Re: [phplib] how to check if logined in? From: Philip Strnad (philip <email protected>)
Date: 02/26/01

You can also try using $auth->is_authenticated(), but in the past it has
acted strangely for me. In 7.0 it worked fine but in 7.2 it doesn't do
what I want/need it to do.

Philip

Brian Popp wrote:
>
> Not sure I'm understanding you. Depending on what is written in your auth
> class, you will never get past the page_open UNLESS the user is logged in
> (making the conditional unnecessary). The only times auth will NOT require a
> login first is if the auth class sets $nobody to true OR the overridden
> auth_preauth() function of the auth class returns a valid user_id.
>
> If you have $nobody set to true (silent auth), you can always check to see
> whether they are a valid user or a "nobody" by checking $auth->auth:
>
> if ( $auth->auth["uid"] == "nobody" )
> echo "He's a nobody..";
> else
> echo "He's a valid user!";
>
> Hope this helps..
>
> bpopp - bpopp.net
>
> -----Original Message-----
> From: Kenneth Siu [mailto:kenneth <email protected>]
> Sent: Monday, February 26, 2001 5:33 AM
> To: phplib <email protected>
> Subject: [phplib] how to check if logined in?
>
> I would like to ask how to check if a user has logined in?
> like:
> =======================================
> page_open(array("sess" => "TFQ_Session",
> "auth" => "TFQ_Auth",
> "perm" => "TFQ_Perm"));
>
> if is_login {
> $auth->logout();
> $sess->delete();
> }
>
> redirect to another login page.
> =========================================
>
> Actually, I want to prepare a login page that will clear all the previous
> session variables before a new login session.
>
> Please guide.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>

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