Fixed some bugs
This commit is contained in:
@@ -7,6 +7,19 @@ require_once($rootPath . "/header.php");
|
||||
|
||||
checkUserSession();
|
||||
|
||||
// Check if user has active membership
|
||||
if (!isset($_SESSION['user_id'])) {
|
||||
header('Location: login');
|
||||
exit;
|
||||
}
|
||||
|
||||
$is_member = getUserMemberStatus($_SESSION['user_id']);
|
||||
if (!$is_member) {
|
||||
$_SESSION['message'] = "My Blog Posts is only available to active members. Please contact info@4wdcsa.co.za for more information.";
|
||||
header('Location: membership_details');
|
||||
exit;
|
||||
}
|
||||
|
||||
$pageTitle = 'My Blog Posts';
|
||||
$breadcrumbs = [['Home' => 'index'], ['Blog' => 'blog']];
|
||||
require_once($rootPath . '/components/banner.php');
|
||||
|
||||
Reference in New Issue
Block a user