From c1e1e8b8280c7bf8b6cbf284c6bd54a781402b4c Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Thu, 16 May 2013 17:55:52 -0700 Subject: [PATCH] CRM-12648 ---------------------------------------- * CRM-12648: CiviCRM mailing (or other scheduled jobs) do not seem to fire when triggered via wget http://issues.civicrm.org/jira/browse/CRM-12648 --- CRM/Utils/System.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CRM/Utils/System.php b/CRM/Utils/System.php index 4d8d541c84..ed53d72e7f 100644 --- a/CRM/Utils/System.php +++ b/CRM/Utils/System.php @@ -586,6 +586,16 @@ class CRM_Utils_System { */ static function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) { $config = CRM_Core_Config::singleton(); + + // before we do any loading, lets start the session and write to it + // we typically call authenticate only when we need to bootstrap the CMS directly via Civi + // and hence bypass the normal CMS auth and bootstrap process + // typically done in cli and cron scripts + // CRM-12648 + $session = CRM_Core_Session::singleton(); + $session->set( 'civicrmInitSession', TRUE ); + + $dbDrupal = DB::connect($config->userFrameworkDSN); return $config->userSystem->authenticate($name, $password, $loadCMSBootstrap, $realPath); } -- 2.25.1