diff --git a/login/index.php b/login/index.php index 618b4b7a8e8..4fa8f400f31 100644 --- a/login/index.php +++ b/login/index.php @@ -2,7 +2,8 @@ require_once("../config.php"); - $loginguest = optional_param('loginguest', 0, PARAM_BOOL); // determines whether visitors are logged in as guest automatically + $loginguest = optional_param('loginguest', 0, PARAM_BOOL); // determines whether visitors are logged in as guest automatically + $testcookies = optional_param('testcookies', 0, PARAM_BOOL); // request cookie test //initialize variables $errormsg = ''; @@ -95,7 +96,7 @@ /// Check if the user has actually submitted login data to us - if (empty($CFG->usesid) and $frm and (get_moodle_cookie() == '') and ($frm->username!='guest') and !$user and empty($CFG->alternateloginurl)) { // Login without cookie + if (empty($CFG->usesid) and $testcookies and (get_moodle_cookie() == '')) { // Login without cookie when test requested $errormsg = get_string("cookiesnotenabled"); diff --git a/login/index_form.html b/login/index_form.html index d68bdb29b14..e98d639d2ce 100644 --- a/login/index_form.html +++ b/login/index_form.html @@ -47,6 +47,7 @@