mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
(MDL-8745) prevent cannot logon trouble after update to 1.8
This commit is contained in:
parent
918e9805c3
commit
89d1efe4fe
2 changed files with 12 additions and 0 deletions
|
@ -50,6 +50,12 @@
|
||||||
redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
|
redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if major upgrade needed - also present in login/index.php
|
||||||
|
if ((int)$CFG->version < 2006101100) { //1.7 or older
|
||||||
|
@require_logout();
|
||||||
|
redirect("$CFG->wwwroot/$CFG->admin/");
|
||||||
|
}
|
||||||
|
|
||||||
if ($CFG->forcelogin) {
|
if ($CFG->forcelogin) {
|
||||||
require_login();
|
require_login();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
|
|
||||||
require_once("../config.php");
|
require_once("../config.php");
|
||||||
|
|
||||||
|
// check if major upgrade needed - also present in /index.php
|
||||||
|
if ((int)$CFG->version < 2006101100) { //1.7 or older
|
||||||
|
@require_logout();
|
||||||
|
redirect("$CFG->wwwroot/$CFG->admin/");
|
||||||
|
}
|
||||||
|
|
||||||
$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
|
$testcookies = optional_param('testcookies', 0, PARAM_BOOL); // request cookie test
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue