summaryrefslogtreecommitdiff
path: root/viewthread.php
diff options
context:
space:
mode:
authorcflip <36554078+cflip@users.noreply.github.com>2021-04-24 19:50:59 -0600
committercflip <36554078+cflip@users.noreply.github.com>2021-04-24 19:50:59 -0600
commitfe3e6194d33d63f149f2a362adf325019278d61e (patch)
tree29242725a90a10d3d7870fac039d86cbaa5c3e5c /viewthread.php
parent2098bf444afadcf0363d89b4cc1dca5d2213d754 (diff)
Use Session class instead of $_SESSION
Diffstat (limited to 'viewthread.php')
-rw-r--r--viewthread.php3
1 files changed, 1 insertions, 2 deletions
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 <a href="signin.php">signed in</a> 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';