From 82801fed8aeaed29fda33911b40f624297e8a7e3 Mon Sep 17 00:00:00 2001 From: jouls Date: Tue, 16 Apr 2024 15:46:49 +0800 Subject: [PATCH] Added Error Handling for My Account Redirections on Vendor Pages --- user-profile.php | 2 +- vendor-dashboard.php | 5 +++++ vendor-payments.php | 5 +++++ vendor-payouts.php | 4 ++++ vendor-refund-history.php | 5 +++++ vendor-uploads.php | 5 +++++ 6 files changed, 25 insertions(+), 1 deletion(-) diff --git a/user-profile.php b/user-profile.php index dd7222f..e7d66fb 100644 --- a/user-profile.php +++ b/user-profile.php @@ -12,7 +12,7 @@ if ($_SESSION["userId"] <> "") { header("location: login.php"); } if ($_SESSION["isVendor"] == true) { - header("location: vendor-settings.php"); + header("location: vendor-dashboard.php"); } diff --git a/vendor-dashboard.php b/vendor-dashboard.php index 4223c08..9b16140 100644 --- a/vendor-dashboard.php +++ b/vendor-dashboard.php @@ -28,6 +28,11 @@ if (is_array($vendorOrderss)) { echo "Unknown type or no 'message' property found."; } +if ($_SESSION["isCustomer"] == true) { + header("location: user-profile.php"); +} + + ?>