-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemail-verify.php
41 lines (30 loc) · 1.05 KB
/
email-verify.php
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
40
41
<?php
require_once("config.php");
$pageTitle = "Email Verification";
try {
$auth->confirmEmail($_GET['selector'], $_GET['token']);
$msg = 'Email address has been verified';
} catch (\Delight\Auth\InvalidSelectorTokenPairException $e) {
$msg = 'Invalid token';
} catch (\Delight\Auth\TokenExpiredException $e) {
$msg = 'Token expired';
} catch (\Delight\Auth\UserAlreadyExistsException $e) {
$msg = 'Email address already exists';
} catch (\Delight\Auth\TooManyRequestsException $e) {
$msg = 'Too many requests';
}
require_once("header.php");
?>
<div class="row text-center align-items-center" style=" background:#eee; min-height: 100vh;">
<div class="col">
<p><strong><?= $pageTitle ?>: </strong><?= $msg ?>
<span class="p-4">|</span>
<a href="login.php" class="pe-4">Login</a>
<a href="register.php">Register</a>
</p>
<p><i>Note: This is demo only. The email address is automatically verified upon registration.</i></p>
</div>
</div>
<?php
require_once("footer.php");
?>