From 4fd42754a01af7f7b48e5f355848aa10262117e1 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Tue, 13 Oct 2020 07:56:29 +1100 Subject: [PATCH] backdrop#116 Override sessionStart function and use backdrop functions as appropriate --- CRM/Utils/System/Backdrop.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CRM/Utils/System/Backdrop.php b/CRM/Utils/System/Backdrop.php index 93342e256f..9e7f564013 100644 --- a/CRM/Utils/System/Backdrop.php +++ b/CRM/Utils/System/Backdrop.php @@ -1033,4 +1033,20 @@ AND u.status = 1 $e->list[] = 'js/crm.backdrop.js'; } + /** + * Start a new session. + */ + public function sessionStart() { + if (function_exists('backdrop_session_start')) { + // https://issues.civicrm.org/jira/browse/CRM-14356 + if (!(isset($GLOBALS['lazy_session']) && $GLOBALS['lazy_session'] == TRUE)) { + backdrop_session_start(); + } + $_SESSION = []; + } + else { + session_start(); + } + } + } -- 2.25.1