From 871ad2ea7e66286cff10ddb3e9522ddcb40ea68b Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 10 Dec 2025 12:21:12 -0500 Subject: [PATCH] Update legacy client login links to use the new unified login method --- client/includes/check_login.php | 4 +- client/login.php | 234 -------------------------------- client/login_microsoft.php | 14 +- client/login_reset.php | 6 +- client/post.php | 2 +- login.php | 2 +- 6 files changed, 14 insertions(+), 248 deletions(-) delete mode 100644 client/login.php diff --git a/client/includes/check_login.php b/client/includes/check_login.php index 52f26af7..3e5adb94 100644 --- a/client/includes/check_login.php +++ b/client/includes/check_login.php @@ -16,13 +16,13 @@ if (!isset($_SESSION)) { } if (!isset($_SESSION['client_logged_in']) || !$_SESSION['client_logged_in']) { - header("Location: /client/login.php"); + header("Location: /login.php"); die; } // Check user type if ($_SESSION['user_type'] !== 2) { - header("Location: /client/login.php"); + header("Location: /login.php"); exit(); } diff --git a/client/login.php b/client/login.php deleted file mode 100644 index c3b0dea1..00000000 --- a/client/login.php +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - <?php echo $company_name; ?> | Client Portal Login - - - - - - - - - - - - - - - - - - - -
- -
- - - -
- - -
- - - Powered by ITFlow'; - } - ?> - - - - - - - - - - - - - - - diff --git a/client/login_microsoft.php b/client/login_microsoft.php index be938aac..ce0e9afe 100644 --- a/client/login_microsoft.php +++ b/client/login_microsoft.php @@ -133,20 +133,20 @@ if (isset($_POST['code']) && $_POST['state'] == session_id()) { header("Location: index.php"); } else { - + $_SESSION['login_message'] = 'Something went wrong with logging you in: Your account is not configured for Entra SSO. Please ensure you are setup in ITFlow as a contact and have Entra SSO configured.'; - + header("Location: index.php"); } - + } - + header('Location: index.php'); - + } else { - + echo "Error getting access_token"; - + } } diff --git a/client/login_reset.php b/client/login_reset.php index a90dda7e..826cb040 100644 --- a/client/login_reset.php +++ b/client/login_reset.php @@ -12,7 +12,7 @@ require_once '../includes/load_global_settings.php'; if (empty($config_smtp_host)) { - header("Location: login.php"); + header("Location: /login.php"); exit(); } @@ -157,7 +157,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { // Redirect to login page $_SESSION['login_message'] = "Password reset successfully!"; - header("Location: login.php"); + header("Location: /login.php"); exit(); } else { @@ -275,7 +275,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") { ?>

- Back to login + Back to login diff --git a/client/post.php b/client/post.php index 270d2695..7c7f25fc 100644 --- a/client/post.php +++ b/client/post.php @@ -320,7 +320,7 @@ if (isset($_GET['logout'])) { session_unset(); session_destroy(); - redirect('login.php'); + redirect('/login.php'); } diff --git a/login.php b/login.php index afbb4e8b..0e974007 100644 --- a/login.php +++ b/login.php @@ -558,7 +558,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && (isset($_POST['login']) || isset($_
-
Forgot password?
+ Forgot password?