-
Notifications
You must be signed in to change notification settings - Fork 2
/
finish.php
34 lines (32 loc) · 1.1 KB
/
finish.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
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
require_once('class.ProfilesPage.php');
$page = new ProfilesPage('Burning Flipside Profiles');
$page->addJS('js/finish.js');
if(!isset($_GET['hash']))
{
$page->addNotification("No hash set! Please ensure you copy the link exactly from the email!", $page::NOTIFICATION_FAILED);
}
else
{
$auth = AuthProvider::getInstance();
$user = $auth->getTempUserByHash($_GET['hash']);
if($user === false)
{
$page->addNotification("Unable to locate user! This registration has either expired or already been completed!", $page::NOTIFICATION_FAILED);
}
else
{
if($auth->activatePendingUser($user) === false)
{
$page->addNotification("Internal Error! ".$server->lastError(), $page::NOTIFICATION_FAILED);
}
else
{
$page->addNotification('You have successfully registered! You will be redirected to the login page in <span id="secs">5</span> seconds…', $page::NOTIFICATION_SUCCESS);
}
}
}
$page->printPage();
/* vim: set tabstop=4 shiftwidth=4 expandtab: */