Re: Front Page User Logout
| From: | Curt Zirzow | Date: | Thu, 04 Sep 2003 22:09:46 +0000 |
| Subject: | Re: Front Page User Logout | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161698@lists.php.net to get a copy of this message | ||
* Thus wrote John W. Holmes (holmes072000@charter.net):
> John Welty wrote:
>
> >I'm only accessing the result of the user logging in through
> >$GLOBALS["PHP_AUTH_USER"]
> >
> >I've tried unsetting that but it doesn't change anything. The only thing
> >that logs a user out is them closing their browser and reopening it. I'd
> >like a user to be able to switch usernames by clicking a link that would
> >accomplish the same thing that closing the browser does. Perhaps I need
> >clientside scripting for this?
>
> There's no way to log out of Basic Authentication except by closing your
> browser. There is one trick you can try, though. You can provide a link
> to your side with a bad username and password, which will fail
> authentication, and then redirect them back to the login page (assuming
> that's what your application does). Have a "logout" link that points to
> something like http://baduser:badpassword@www.yourdomain.com
just to not frighten some end users (due to some browsers warning
about sending a password) mabey use:
http://user:logout@www.yourdomain.com/
That way the user can deduct at what it is doing and not worry
about sending it.
.0125
Curt
--
"I used to think I was indecisive, but now I'm not so sure."