Skip to content

Commit

Permalink
MDL-9824 do not use sesskey check when user already logged out in log…
Browse files Browse the repository at this point in the history
…out.php; merged from MOODLE_18_STABLE
  • Loading branch information
skodak committed May 15, 2007
1 parent a7156b5 commit 8eb81bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion login/logout.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

$sesskey = optional_param('sesskey', '__notpresent__', PARAM_RAW); // we want not null default to prevent required sesskey warning

if (!confirm_sesskey($sesskey)) {
if (!isloggedin()) {
// no confirmation, user has already logged out
require_logout();
redirect($redirect);

} else if (!confirm_sesskey($sesskey)) {
print_header($SITE->fullname, $SITE->fullname, 'home');
notice_yesno(get_string('logoutconfirm'), 'logout.php', $CFG->wwwroot.'/', array('sesskey'=>sesskey()), null, 'post', 'get');
print_footer();
Expand Down

0 comments on commit 8eb81bd

Please sign in to comment.