RE: [PHP] Front Page User Logout

This is a discussion on RE: [PHP] Front Page User Logout within the PHP General forums, part of the PHP Programming Forums category; [snip] How can I provide a link which will log the current user out so that they will be prompted ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-04-2003
Jay Blanchard
 
Posts: n/a
Default RE: [PHP] Front Page User Logout

[snip]
How can I provide a link which will log the current user out so that
they
will be prompted again to login. I'm using frontpage authentication on
an
apache server. I'm using PHP4 to build the pages.
[/snip]

Are you taking the frontpage variables into PHP? If so you can unset()
those variables.
Reply With Quote
  #2 (permalink)  
Old 09-04-2003
John Welty
 
Posts: n/a
Default Re: [PHP] Front Page User Logout

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?

Thanks,

--John

"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:C8F323573C030A448F3E5A2B6FE2070B01AFA798@neme sis...
[snip]
How can I provide a link which will log the current user out so that
they
will be prompted again to login. I'm using frontpage authentication on
an
apache server. I'm using PHP4 to build the pages.
[/snip]

Are you taking the frontpage variables into PHP? If so you can unset()
those variables.
Reply With Quote
  #3 (permalink)  
Old 09-04-2003
Curt Zirzow
 
Posts: n/a
Default Re: [PHP] Front Page User Logout

* 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."
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:02 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0