2 // Logs the user out and sends them to the home page
4 require_once("../config.php");
6 if (!empty($USER->mnethostid
) and $USER->mnethostid
!= $CFG->mnet_localhost_id
) {
7 $host = get_record('mnet_host', 'id', $USER->mnethostid
);
8 $wwwroot = $host->wwwroot
;
10 $wwwroot = $CFG->wwwroot
;
15 redirect("$wwwroot/");