Compare commits

..

No commits in common. "3279a565aaa6766dcfff2770eab7d7ec91e1a1a1" and "06bf414f41e7292cf0d55e1359451b07dd26d30b" have entirely different histories.

3 changed files with 8 additions and 36 deletions

View File

@ -1,11 +1,8 @@
<?php
/**
* Logs Listings
*
* This page ("logs") retrieves and displays logs for a specified user within a time range.
* It supports pagination and filtering, and generates a widget to display the logs.
*/
//
// logs listings
//
// specify time range
include '../app/helpers/time_range.php';
@ -16,7 +13,7 @@ $browse_page = $_REQUEST['p'] ?? 1;
$browse_page = (int)$browse_page;
$offset = ($browse_page -1) * $items_per_page;
// logs scope: user or system
// user or system
$scope = 'user';
// prepare the result

View File

@ -1,24 +1,5 @@
<?php
/**
* User Profile Management
*
* This page ("profile") handles user profile actions such as updating user details,
* avatar management, and assigning or removing user rights.
* It supports both form submissions and displaying profile templates.
*
* Actions handled:
* - `remove`: Remove a user's avatar.
* - `edit`: Edit user profile details, rights, or avatar.
*
* Global Variables Used:
* - `$userObject`: Instance of the user management class.
* - `$userDetails`: Current user details array.
* - `$userRights`: Array of user's current rights.
* - `$config`: Configuration array for avatars and other settings.
* - `$app_root`: Base URL of the application.
*/
$action = $_REQUEST['action'] ?? '';
// if a form is submitted, it's from the edit page

View File

@ -1,17 +1,9 @@
<?php
/**
* 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
// registration is allowed, go on
if ($config['registration_enabled'] === true) {
// clear any previous error messages
// require '../app/classes/user.php';
unset($error);
try {
@ -19,6 +11,8 @@ 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'];