summaryrefslogtreecommitdiff
path: root/signin/signin.php
diff options
context:
space:
mode:
Diffstat (limited to 'signin/signin.php')
-rwxr-xr-xsignin/signin.php5
1 files changed, 2 insertions, 3 deletions
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");