-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify.php
More file actions
39 lines (34 loc) · 957 Bytes
/
verify.php
File metadata and controls
39 lines (34 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
require_once __DIR__ . '/auth.php';
$token = $_GET['token'] ?? '';
if (empty($token)) {
header('Location: ' . BASE_URL . '/login.php');
exit;
}
$userId = verifyMagicToken($token);
if ($userId === null) {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Invalid Link - Voudou Ropes</title>
<link rel="stylesheet" href="assets/style.css">
</head>
<body>
<div class="auth-container">
<h1>Voudou Ropes</h1>
<div class="alert alert-error">
This login link is invalid or has expired. Please request a new one.
</div>
<a href="login.php" class="btn btn-primary">Request New Link</a>
</div>
</body>
</html>
<?php
exit;
}
loginUser($userId);
header('Location: ' . BASE_URL . '/checklist.php');
exit;