mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
mnet: $CFG->mnet_dispatcher_mode - ensure we set it on install and upgrade, silence warnings - MDL-8284
This commit is contained in:
parent
3efde7e21a
commit
36e6379ef8
@ -1836,7 +1836,7 @@ function print_my_moodle() {
|
||||
$courses = get_my_courses($USER->id);
|
||||
$rhosts = array();
|
||||
$rcourses = array();
|
||||
if ($CFG->mnet_dispatcher_mode === 'strict') {
|
||||
if (!empty($CFG->mnet_dispatcher_mode) && $CFG->mnet_dispatcher_mode==='strict') {
|
||||
$rcourses = get_my_remotecourses($USER->id);
|
||||
$rhosts = get_my_remotehosts();
|
||||
}
|
||||
|
@ -226,7 +226,8 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) {
|
||||
}
|
||||
|
||||
// TODO: if the user failed to authenticate, check if the username corresponds to a remote mnet user
|
||||
if ( $CFG->mnet_dispatcher_mode === 'strict'
|
||||
if ( !empty($CFG->mnet_dispatcher_mode)
|
||||
&& $CFG->mnet_dispatcher_mode === 'strict'
|
||||
&& is_enabled_auth('mnet')) {
|
||||
$errormsg .= get_string('loginlinkmnetuser', 'mnet', "mnet_email.php?u=$frm->username");
|
||||
}
|
||||
|
@ -24,6 +24,10 @@ class mnet_environment {
|
||||
function init() {
|
||||
global $CFG;
|
||||
|
||||
if (empty($CFG->mnet_dispatcher_mode)) {
|
||||
set_config('mnet_dispatcher_mode', 'off');
|
||||
}
|
||||
|
||||
// Bootstrap the object data on first load.
|
||||
if (empty($CFG->mnet_localhost_id) ) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user