Versao 1
This commit is contained in:
parent
41e03f0c1f
commit
53ddf15d83
@ -17,6 +17,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$stmt->execute([$username]);
|
||||
$user = $stmt->fetch();
|
||||
|
||||
// DEBUGGING LINES
|
||||
echo "<!--";
|
||||
echo "Submitted password: " . htmlspecialchars($password) . "\n";
|
||||
echo "User data from DB: ";
|
||||
print_r($user);
|
||||
echo "Password verification result: " . (password_verify($password, $user['password']) ? 'true' : 'false') . "\n";
|
||||
echo "-->";
|
||||
// END DEBUGGING LINES
|
||||
|
||||
if ($user && password_verify($password, $user['password'])) {
|
||||
$_SESSION['user_id'] = $user['id'];
|
||||
$_SESSION['username'] = $user['username'];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user