Skip to content

Commit

Permalink
Moodle 4.5 Session handler compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
benyovszky authored Nov 20, 2024
1 parent 50357d4 commit 6b76deb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions moosh.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6b76deb

Please sign in to comment.