+
+ // 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);