3 require_once(dirname(dirname(__FILE__
))."/includes.php");
6 $user->ident
= $USER->ident
;
7 if ($USER->ident
) { //for some reason this can run with user id 0...?
8 update_record('users',$user);
13 unset($_SESSION['USER']);
14 unset($_SESSION['SESSION']);
15 unset($_SESSION['userid']);
16 unset($_SESSION['username']);
17 unset($_SESSION['name']);
18 unset($_SESSION['email']);
19 unset($_SESSION['icon']);
20 unset($_SESSION['icon_quota']);
22 if (isset($_COOKIE[session_name()])) {
23 setcookie(session_name(), '', time()-84600, $CFG->cookiepath
);
26 // Remove the any AUTH_COOKIE persistent logins
27 setcookie(AUTH_COOKIE
, '', time()-84600, $CFG->cookiepath
);
31 // Set headers to forward to main URL
32 header("Location: " . $CFG->wwwroot
. "\n");