| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Summary view] [Print] [Text view]
1 <?php // $Id: logout.php,v 1.25 2007/05/15 21:13:23 skodak Exp $ 2 // Logs the user out and sends them to the home page 3 4 require_once("../config.php"); 5 6 // can be overriden by auth plugins 7 $redirect = $CFG->wwwroot.'/'; 8 9 $sesskey = optional_param('sesskey', '__notpresent__', PARAM_RAW); // we want not null default to prevent required sesskey warning 10 11 if (!isloggedin()) { 12 // no confirmation, user has already logged out 13 require_logout(); 14 redirect($redirect); 15 16 } else if (!confirm_sesskey($sesskey)) { 17 print_header($SITE->fullname, $SITE->fullname, 'home'); 18 notice_yesno(get_string('logoutconfirm'), 'logout.php', $CFG->wwwroot.'/', array('sesskey'=>sesskey()), null, 'post', 'get'); 19 print_footer(); 20 die; 21 } 22 23 $authsequence = get_enabled_auth_plugins(); // auths, in sequence 24 foreach($authsequence as $authname) { 25 $authplugin = get_auth_plugin($authname); 26 $authplugin->logoutpage_hook(); 27 } 28 29 require_logout(); 30 31 redirect($redirect); 32 33 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |