Commit fdf4feab authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Allow logout requests to continue even if the session is logged out.

parent c95e6441
......@@ -460,10 +460,14 @@ function auth_draw_login_page($message=null, Form $form=null) {
else {
require_once('form.php');
$loginform = form(auth_get_login_form());
// If this is true, the form was submitted even before being built.
// This happens when a user's session times out and they resend post
// data. The request should just continue if so.
if ($USER) {
/*
* If $USER is set, the form was submitted even before being built.
* This happens when a user's session times out and they resend post
* data. The request should just continue if so.
*
* Also, the request should continue if the user has opted to log out.
*/
if ($USER || isset($_GET['logout'])) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment