From f2199b5c2d52a3c9894a1a0d9ce87a5af305e1bf Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Fri, 18 Aug 2023 13:21:56 +0200 Subject: [PATCH] MDL-78179 badges: Clean SESSION when user disconnect backpack The token information was not being properly cleared from the $SESSION. As a result, certain errors were occurring when users attempted to reconnect within the same session. --- badges/classes/backpack_api.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/badges/classes/backpack_api.php b/badges/classes/backpack_api.php index 38627e6a0db..08e5ba33997 100644 --- a/badges/classes/backpack_api.php +++ b/badges/classes/backpack_api.php @@ -640,6 +640,8 @@ class backpack_api { $DB->delete_records('badge_external', array('backpackid' => $backpackid)); $DB->delete_records('badge_backpack', array('userid' => $userid)); $badgescache->delete($userid); + $this->clear_system_user_session(); + return true; }