need to import global $CFG
Merge branch 'patches/separate-sessions-db' into MOODLE_26_STABLE-local