Fixes for Bug MDL-8617 "Implement groupings & course modules..."
[moodle-pu.git] / login / logout.php
blob4714963209245a2e31db11a17fa5b50dd530a532
1 <?php // $Id$
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;
9 } else {
10 $wwwroot = $CFG->wwwroot;
13 require_logout();
15 redirect("$wwwroot/");