diff --git a/admin/enrol.php b/admin/enrol.php index 8dba7c6d2e3..6ffe8209da2 100644 --- a/admin/enrol.php +++ b/admin/enrol.php @@ -16,6 +16,10 @@ error("Only the admin can use this page"); } + if (!confirm_sesskey()) { + error(get_string('confirmsesskeybad', 'error')); + } + $enrol = clean_filename($enrol); require_once("$CFG->dirroot/enrol/$enrol/enrol.php"); /// Open the class @@ -27,7 +31,7 @@ if ($frm = data_submitted()) { if ($enrolment->process_config($frm)) { set_config('enrol', $frm->enrol); - redirect("enrol.php", get_string("changessaved"), 1); + redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1); } } else { $frm = $CFG; @@ -50,13 +54,14 @@ $str->users -> $str->enrolments"); echo "