diff --git a/login.php b/login.php index fd3ccaa..2d817c3 100644 --- a/login.php +++ b/login.php @@ -30,9 +30,9 @@ } else { $user = pg_fetch_array($response); if (password_verify($p, $user["password_hash"])) { + $token = get_token($u, $user["password_hash"]); setcookie( - "token", - $token, + "token", $token, time() + 60 * 60 * 24 * 30 * 265 // 1 year from now ); header("Location: index.php");