diff --git a/lib/setuplib.php b/lib/setuplib.php index 139a7464b49..24e0fb79cfa 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -697,7 +697,7 @@ function initialise_fullme() { define('NO_MOODLE_COOKIES', true); } // The login/token.php script should call the correct url/port. - if (defined('REQUIRE_CORRECT_ACCESS')) { + if (defined('REQUIRE_CORRECT_ACCESS') && REQUIRE_CORRECT_ACCESS) { $wwwrootport = empty($wwwroot['port'])?'':$wwwroot['port']; $calledurl = $rurl['host']; if (!empty($rurl['port'])) {