diff --git a/resources/check_auth.php b/resources/check_auth.php index cbaa85e8e6..00d8b38b66 100644 --- a/resources/check_auth.php +++ b/resources/check_auth.php @@ -261,8 +261,10 @@ exit(); } else if ($_SESSION['login']['destination']['url'] != '') { - header("Location: ".$_SESSION['login']['destination']['url']); - exit(); + if (isset($_SESSION["username"]) && (strlen($_SESSION["username"]) > 0)) { + header("Location: ".$_SESSION['login']['destination']['url']); + exit(); + } } }