1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Reuse existing session cookie

From ajax-chat

Jump to: navigation, search

How to reuse an existing session cookie

If you want to reuse an existing session cookie set from another application just adjust the following setting in lib/config.php:

// Session handling:
$config['sessionName'] = 'PHPSESSID';

Change PHPSESSID to the name of the session cookie you want to use.

If AJAX Chat is starting the PHP session you'll need as well to prevent the regeneration of the session ID on successful login to avoid conflicts with the other application.
To do so, just override the method regenerateSessionID by adding the following code to the class CustomAJAXChat in lib/class/CustomAJAXChat.php:

   function regenerateSessionID() {
      // Never regenerate the session ID
Personal tools