From: skodak Date: Thu, 6 Jul 2006 10:11:06 +0000 (+0000) Subject: Bug #4698 - Login block is broken!, improved cookie test; merged from MOODLE_16_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2cc14e87d33debe44b07cf285c45d0faee6e257b;p=moodle.git Bug #4698 - Login block is broken!, improved cookie test; merged from MOODLE_16_STABLE --- diff --git a/login/index.php b/login/index.php index 618b4b7a8e..4fa8f400f3 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 d68bdb29b1..e98d639d2c 100644 --- a/login/index_form.html +++ b/login/index_form.html @@ -47,6 +47,7 @@ " /> + @@ -58,6 +59,7 @@
+ " />