Adds phpdoc comments
parent
4f5557f6ca
commit
69ac69f41c
|
@ -1,9 +1,17 @@
|
|||
<?php
|
||||
|
||||
// registration is allowed, go on
|
||||
/**
|
||||
* User registration
|
||||
*
|
||||
* This page ("register") handles user registration if the feature is enabled in the configuration.
|
||||
* It accepts a POST request with a username and password, attempts to register the user,
|
||||
* and redirects to the login page on success or displays an error message on failure.
|
||||
*/
|
||||
|
||||
// check if the registration is allowed
|
||||
if ($config['registration_enabled'] === true) {
|
||||
|
||||
// require '../app/classes/user.php';
|
||||
// clear any previous error messages
|
||||
unset($error);
|
||||
|
||||
try {
|
||||
|
@ -11,8 +19,6 @@ if ($config['registration_enabled'] === true) {
|
|||
// connect to database
|
||||
$dbWeb = connectDB($config);
|
||||
|
||||
// $userObject = new User($dbWeb);
|
||||
|
||||
if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
|
||||
$username = $_POST['username'];
|
||||
$password = $_POST['password'];
|
||||
|
|
Loading…
Reference in New Issue