Re: [PHPLIB] logout boggle From: tom morgan (phplib <email protected>)
Date: 01/28/00

On Thu, 27 Jan 2000, Jan Johansson wrote:

> I get the user/pass dialog, and if i enter an user that doesnt have admin
> i get the
>
> Permission denied
> Your session 344e8c2385b4106154faaaf5c07f0abd has been authenticated with
> a user id of 6943ed4b9358bd176277c5212e3d43bb and a user name of j2.
> To access this page, the following permissions are required: admin.
> I won't let you access this page, because you have these permissions: .
>
> However, from this point on, reloading the page gives me the above dialog,
> i am never asked to re-auth. (running IE5, set to "check page on every
> load")
>
> 1. How do i return to the login screen if the above happens?
>
> 2. How do i log a user out? Neither $auth= unauth($nobody=false); or
> $auth = logout(); Seems to work.
>
> (yes, i know they are commented out in the above code, im trying to fix
> the auth dialog thing first)

i have found that msie 5.01 won't stop caching things when it gets both
  content-control: no-cache
and
  pragma: no-cache
so i changed session.inc by commenting out the pragma: line... msie 5.01
seems to have responded well to that. havn't had a chance to test it in
msie 4 or below yet.

regarding your question #1, i quit using $perm->check() and went to my own
code in each page, using have_perm()... this allows me to generate a login
form and display a nicer message related to the page they're accessing.

for logging out, i'm using $auth->login_if($again); i seem to recall
something on here about not using that exact construct, but i probably
hacked the actual phplib code to get around that as i made several changes
to the phplib code to adjust the login system...

--tom
zarq.com

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.