Skip to content

Reuse existing session cookie

Frug edited this page Oct 11, 2012 · 1 revision

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
   }