Browse Source

Update check_auth.php

FusionPBX 8 years ago
parent
commit
2aba0659a1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      resources/check_auth.php

+ 1 - 1
resources/check_auth.php

@@ -46,7 +46,7 @@
 	if (!isset($_SESSION['template_content'])) { $_SESSION["template_content"] = null; }
 
 //if the username is not provided then send to login.php
-	if (strlen($_REQUEST["username"]) == 0 && strlen($_REQUEST["key"]) == 0) {
+	if (strlen($_SESSION['username']) == 0 && strlen($_REQUEST["username"]) == 0 && strlen($_REQUEST["key"]) == 0) {
 		$target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["REQUEST_URI"];
 		header("Location: ".PROJECT_PATH."/login.php?path=".urlencode($target_path));
 		exit;