• 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

Change of Nick

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

Post a reply
2 posts • Page 1 of 1

Postby blizarre » Thu Aug 05, 2010 1:49 pm

Hi !
I'm using your scripts right now and it works fine ! Just a small question though .....

I have seen that the nickname is stored in a session variable, initialised the first time a user gives his nick (through $params or dialog box).
However, I would like to be able to change that nick through a GET parameter :

<-- Beginning of my index.php script -->

session_start();

if (isset($_GET['Id']) and $_GET['Id'] != '' )
$_SESSION["Nick"] = htmlspecialchars( $_GET['Id'] );

if( isset($_SESSION["Nick"]) and $_SESSION["Nick"] != '')
$params["nick"] = $_SESSION["Nick"];
else
$params["nick"] = "guest".rand(1,1000);

Now, if I reload the page with another Id (say index.php?Id=foo ), the old one is still in use ..... I don't want to bother my users with /nick and other commands, so is it possible to "clear" the session data ? Or just force a nick change ?


Thank you !
blizarre
New member
 
Posts: 1
Joined: Thu Aug 05, 2010 10:42 am
Top

Postby OldWolf » Thu Aug 12, 2010 6:49 am

I've been away, did you ever find a solution?
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top


Post a reply
2 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 24 guests

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