From 6b76debc917c1caad28f31185884a0b956712921 Mon Sep 17 00:00:00 2001 From: benyovszky Date: Wed, 20 Nov 2024 11:28:58 +0100 Subject: [PATCH] Moodle 4.5 Session handler compatibility --- moosh.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/moosh.php b/moosh.php index fb5d3be2..46020a55 100755 --- a/moosh.php +++ b/moosh.php @@ -296,6 +296,11 @@ function string_exists() { } } if (session_status() !== PHP_SESSION_ACTIVE) { + if (method_exists('\core\session\manager', 'destroy_all')) { + \core\session\manager::destroy_all(); + } else { + \core\session\manager::kill_all_sessions(); + } session_start(); } //Deviceanalytics redirect on login event, we need to avoid that.