From 1b35cf3f1124b161ebde5e9e3a2c74c8ea2821d0 Mon Sep 17 00:00:00 2001 From: Connor Thomson Date: Sun, 20 Sep 2026 21:01:48 -0700 Subject: Add status and more --- signin/signin.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'signin') diff --git a/signin/signin.php b/signin/signin.php index 6e88336..f7f3c23 100755 --- a/signin/signin.php +++ b/signin/signin.php @@ -28,7 +28,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $remember = isset($_POST['remember']); try { - $sql = "SELECT id, username, password, verification_code FROM users WHERE username = :username"; + $sql = "SELECT id, username, password, status FROM users WHERE username = :username"; $user = fetch_row($sql, ['username' => $username]); } catch (\PDOException $e) { @@ -36,13 +36,12 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { exit; } - // The same message either way, so it does not say which usernames exist if (!$user || !password_verify($password, $user['password'])) { echo "Username or password is not correct!"; exit; } - if ($user['verification_code'] != '0001') { + if ($user['status'] == 'none') { set_user_id((int)$user['id']); header("Location: /signup/verify"); -- cgit v1.2.3