浏览代码

Move the login destination here so it will work at the user level.

FusionPBX 4 年之前
父节点
当前提交
f7fb8f4646
共有 1 个文件被更改,包括 11 次插入0 次删除
  1. 11 0
      resources/check_auth.php

+ 11 - 0
resources/check_auth.php

@@ -294,6 +294,17 @@
 						unset($sql, $parameters, $result, $row);
 				}
 			}
+
+		//if logged in, redirect to login destination
+			if (strlen($_SESSION['login']['destination']['url']) > 0) {
+				header("Location: ".$_SESSION['login']['destination']['url']);
+			} elseif (file_exists($_SERVER["PROJECT_ROOT"]."/core/user_settings/user_dashboard.php")) {
+				header("Location: ".PROJECT_PATH."/core/user_settings/user_dashboard.php");
+			}
+			else {
+				require_once "resources/header.php";
+				require_once "resources/footer.php";
+			}
 	}
 
 //set the time zone