CRM-14356 - CRM_Core_Session - Handle Drupal's lazy sessions
authorTim Otten <totten@civicrm.org>
Fri, 11 Apr 2014 22:22:01 +0000 (15:22 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 11 Apr 2014 23:00:57 +0000 (16:00 -0700)
This is Ken's original patch from
http://forum.civicrm.org/index.php/topic,31800.msg136249.html

CRM/Core/Session.php

index 7390bd19599e979cc134add6cf76176417837659..c1a747b1ef9818400ceccfc4c8af8b279497898d 100644 (file)
@@ -119,7 +119,10 @@ class CRM_Core_Session {
         }
         $config =& CRM_Core_Config::singleton();
         if ($config->userSystem->is_drupal && function_exists('drupal_session_start')) {
-          drupal_session_start();
+          if ($GLOBALS['lazy_session'] != true) {
+            drupal_session_start();
+          }
+          $_SESSION = array();
         }
         else {
           session_start();