Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-3167

CiviCRM sometimes unsets $_SESSION during hook_user

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      I suspect that CiviCRM is clearing the session variable in some situations in hook_user() $op = "update". Therefore the following code in hook_update_N (http://api.drupal.org/api/function/hook_update_N/5) will sometimes die:

      $_SESSION['my_key'] = 123;
      $account = user_load(array('uid' =>567));
      user_save($account, array('my_key' => 890));
      if (!is_set($_SESSION['my_key'])) {
      die('You've got a big problem!');
      }

      The problem is intermitent. The problem went away when I disabled CiviCRM. Meaning that the issue is either CiviCRM, or some other module in my installation that plays with the $_SESSION var in hook_civicrm_pre() or hook_civicrm_post(), but I believe that I ruled out the later possibility.

      This could be related to CRM-3015

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              dalin dave hansen-lange
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: