• 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

Nick management

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

Post a reply
3 posts • Page 1 of 1

Postby edkirin » Thu Oct 22, 2009 8:56 am

Hi there.

First of all, thanks for providing an excellent chat script. It works flawlessly, but I need some specific nick handling. I have my own site with registered users (running on django) and I need to make a bridge with the chat. Of course, users are not allowed to change their nick names (frozen_nick = true).

I start chat providing user code parameter which is used in index.php to fetch real user name from db, something like http://chat.mydomain.com/?user=7324723477832. Everything works ok, but the last nickname is cached and when other user logs in on chat using the same computer, previous nick name is used, even if I define a new one in $params["nick"].

Here is the simplifyed code:

// get my user code in first script call
if (isset($_GET["user"]))
... fetch user from db, validate, store $_SESSION["my_nick] = $nick_from_db

// set nick for all other calls to index.php
if (isset($_SESSION["my_nick]))
$params["nick"] = $_SESSION["my_nick]

$chat = new phpFreeChat( $params );
...

If I clear the cache (data/private), everything works fine until next nick change.

What is wrong with my approach?

Thank you in advance.
edkirin
New member
 
Posts: 2
Joined: Thu Oct 22, 2009 8:29 am
Top

Postby OldWolf » Fri Oct 23, 2009 5:49 am

Have you tried setting frozen nick to true? That also makes the nick parameter dynamic I believe.
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

Postby edkirin » Fri Oct 23, 2009 1:31 pm

OldWolf wrote:Have you tried setting frozen nick to true? That also makes the nick parameter dynamic I believe.

frozen_nick is set to true.

Anyway, I successfully handled this situation by adding another php script as start script which accepts GET parameters and properly sets session variables to desired nick.

Thanks for help.
edkirin
New member
 
Posts: 2
Joined: Thu Oct 22, 2009 8:29 am
Top


Post a reply
3 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 22 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