• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

[FIX] Can I force the nickname to follow my login session?

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
5 posts • Page 1 of 1

Postby Codebase » Sat Feb 11, 2006 9:58 pm

Hi there..

I have a site where the username is stored in a session. First time I enter the forum I have the correct nickname but if I logout and use the same browserwindow for a new username, the nick in the chat don’t change.

My code I like this:

$params["nick"] = $GLOBALS["HTTP_SESSION_VARS"]["loginName"];

Is there a way to destroy the 'nick session' directly on user logout??

regards
C@debase
Codebase
New member
 
Posts: 3
Joined: Thu Feb 09, 2006 6:55 pm
Top

Postby Djamoer » Sun Feb 12, 2006 6:19 pm

Hi, I think you can do this on your php file to force destroying the current session.
Code: Select all
session_destroy()
Djamoer
Member
 
Posts: 29
Joined: Sun Feb 12, 2006 12:06 pm
Top

Postby phpfreechat » Sun Feb 12, 2006 7:00 pm

session_destroy should work but it will destroy all the other sessions variables.

Maybe a "cleaner" way is :
Code: Select all
unset($_COOKIE["phpfreechat"]);

(but I not sure it works, please test and report any problems)

I will think about adding this functionnality into phpfreechat class.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby SuperBaby » Wed Apr 12, 2006 10:21 pm

kerphi wrote:Maybe a "cleaner" way is :
Code: Select all
unset($_COOKIE["phpfreechat"]);

Code: Select all
session_destroy()


Which file exactly do I insert one of these two lines?
SuperBaby
New member
 
Posts: 3
Joined: Wed Apr 12, 2006 10:05 pm
Top

Postby phpfreechat » Thu Apr 13, 2006 8:09 am

in your logout script.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top


Post a reply
5 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 37 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub