From fe3e6194d33d63f149f2a362adf325019278d61e Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Sat, 24 Apr 2021 19:50:59 -0600 Subject: Use Session class instead of $_SESSION --- viewthread.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'viewthread.php') diff --git a/viewthread.php b/viewthread.php index 73a02ef..812db0a 100644 --- a/viewthread.php +++ b/viewthread.php @@ -79,13 +79,12 @@ foreach ($posts as $post) { include_once 'includes/functions_post.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { - if (!isset($_SESSION['signed_in'])) { + if (!Session::get()->is_signed_in()) { echo 'You must be signed in to reply to this thread.'; return; } $post_content = filter_input(INPUT_POST, 'post_content', FILTER_SANITIZE_STRING); - $user_id = filter_var($_SESSION['user_id'], FILTER_SANITIZE_NUMBER_INT); if (empty($post_content) or !$post_content) { echo 'Thread subject cannot be empty'; -- cgit v1.2.3