• 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

private msg to unknown od not connected user

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

Post a reply
4 posts • Page 1 of 1

Postby siwula » Mon Nov 15, 2010 9:14 pm

Sometimes, when i try to send private message to user i got error:
You are trying to speak to a unknown (or not connected) user
but the user is already connected and active in main chat window.
It's a bug? How to fix it?
siwula
Member
 
Posts: 10
Joined: Sun Oct 10, 2010 3:43 pm
Top

Postby mr_sven » Wed Apr 13, 2011 9:25 pm

Hi,
I've the same problem.
I've installed the last 1.3.

I think I've found the Problem.
It could be a problem with the "nickid", this will generated using SHA1 from the PHP SessionID.
If the SessionID of the User is changed in any kind, the other user sessions will not be notified about the new generated "nickid" so they will not able to send a private message.
If the User reloads the Page, then the others will be notified, so they can send messages.

A possible solution is, generate the nickid only once from the SessionID and then load it from the Session.

In kind of a coupling between phpBB and pFC, it could be the phpBB UserID.

Regards Sven
mr_sven
New member
 
Posts: 2
Joined: Wed Apr 13, 2011 9:15 pm
Top

Postby mr_sven » Thu Apr 14, 2011 7:44 pm

I think I fixed the problem for me.

On my side, I'm using coupling with phpBB and so I'm using the Nicks (from $user->data['username']) and also the nickid (from $user->data['user_id']), so the nickid is always the same.


index.php:
Code: Select all
session_start();
$params["nick"] = $user->data['username'];
$_SESSION["pfcuserconfig_nickid"] = $user->data['user_id'];

pfcuserconfig.class.php line 28
Code: Select all
if (!isset($_SESSION["pfcuserconfig_nickid"])) $this->nickid = sha1(session_id());
else $this->nickid = $_SESSION["pfcuserconfig_nickid"];
mr_sven
New member
 
Posts: 2
Joined: Wed Apr 13, 2011 9:15 pm
Top

Postby re*s.t.a.r.s.*2 » Thu Apr 14, 2011 8:58 pm

Hi there,

As stand alone if the session changes the chat stop responding, when reloading that user browser the new session takes place and the chat ask for a nickname. the user can then start chatting again..

I don't understand a phpbb user can still be logged since his SESSION its not longer the same. session with what he have been authenticated..
If the session changes on PHPBB that user will be taken as a new user that needs to be authenticated...

I might be wrong or Am I missing something..

kind regards..
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top


Post a reply
4 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

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