BurningFlipside /
Profiles
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); |
||
| 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); |
||
| 19 | } |
||
| 20 | else |
||
| 21 | { |
||
| 22 | if($auth->activatePendingUser($user) === false) |
||
| 23 | { |
||
| 24 | $page->addNotification("Internal Error! ".$server->lastError(), $page::NOTIFICATION_FAILED); |
||
| 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…', $page::NOTIFICATION_SUCCESS); |
||
| 29 | $page->addJSByURI('js/finish.js'); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | $page->printPage(); |
||
| 34 | ?> |
||
|
0 ignored issues
–
show
|
|||
| 35 |
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.