$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();
}
}
// 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");
}
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) ) {