Completed
Pull Request — develop (#59)
by Patrick
06:13 queued 04:13
created

finish.php (4 issues)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
ini_set('display_errors', 1);
3
error_reporting(E_ALL);
4
5
require_once('class.ProfilesPage.php');
6
$page = new ProfilesPage('Burning Flipside Profiles');
7
8
if(!isset($_GET['hash']))
9
{
10
    $page->addNotification("No hash set! Please ensure you copy the link exactly from the email!", $page::NOTIFICATION_FAILED);
0 ignored issues
show
The method addNotification() does not seem to exist on object<ProfilesPage>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
11
}
12
else
13
{
14
    $auth = AuthProvider::getInstance();
15
    $user = $auth->getTempUserByHash($_GET['hash']);
16
    if($user === false)
17
    {
18
        $page->addNotification("Unable to locate user! This registration has either expired or already been completed!", $page::NOTIFICATION_FAILED);
0 ignored issues
show
The method addNotification() does not seem to exist on object<ProfilesPage>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
19
    }
20
    else
21
    {
22
        if($auth->activatePendingUser($user) === false)
23
        {
24
            $page->addNotification("Internal Error! ".$server->lastError(), $page::NOTIFICATION_FAILED);
0 ignored issues
show
The method addNotification() does not seem to exist on object<ProfilesPage>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
25
        }
26
        else
27
        {
28
            $page->addNotification('You have successfully registered! You will be redirected to the login page in <span id="secs">5</span> seconds&hellip;', $page::NOTIFICATION_SUCCESS);
0 ignored issues
show
The method addNotification() does not seem to exist on object<ProfilesPage>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
29
        }
30
    }
31
}
32
$page->printPage();
33
/* vim: set tabstop=4 shiftwidth=4 expandtab: */
34