From: cash Date: Thu, 30 May 2013 22:52:08 +0000 (-0400) Subject: Fixes #5559 not clearing last_forward_from in session if login fails X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=f4fef67a3833138b5f87227a0297cd66fcf4a207;p=lorea%2Felgg.git Fixes #5559 not clearing last_forward_from in session if login fails --- diff --git a/actions/login.php b/actions/login.php index 1e5e92ede..bd7f91299 100644 --- a/actions/login.php +++ b/actions/login.php @@ -9,7 +9,6 @@ // set forward url if (!empty($_SESSION['last_forward_from'])) { $forward_url = $_SESSION['last_forward_from']; - unset($_SESSION['last_forward_from']); } elseif (get_input('returntoreferer')) { $forward_url = REFERER; } else { @@ -62,5 +61,9 @@ if ($user->language) { $message = elgg_echo('loginok'); } +if (isset($_SESSION['last_forward_from'])) { + unset($_SESSION['last_forward_from']); +} + system_message($message); forward($forward_url);