A lot of code cleanup and code sanitation done.
This commit is contained in:
@@ -10,8 +10,8 @@ if (!defined('APP_INIT')) {
|
||||
# IDE Section
|
||||
|
||||
# Includes Section
|
||||
include_once($_SERVER['DOCUMENT_ROOT'] . '/bin/php/Classes/pageNavbar.php');
|
||||
include_once($_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_apitoken.php');
|
||||
require_once "{$_SERVER['DOCUMENT_ROOT']}/bin/php/Classes/pageNavbar.php";
|
||||
require_once "{$_SERVER['DOCUMENT_ROOT']}/api/classes/API_apitoken.php";
|
||||
|
||||
# Check permissions
|
||||
$API = new API();
|
||||
@@ -45,7 +45,7 @@ $user_groups_data = $GLOBALS['conn']->query("SELECT * FROM system_user_groups WH
|
||||
$user_groups = array();
|
||||
$admin_data = false;
|
||||
while ($user_group = $user_groups_data->fetch_assoc()) {
|
||||
array_push($user_groups, $user_group);
|
||||
$user_groups[] = $user_group;
|
||||
$last_weight = $user_group['user_group_weight'];
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ $_GET['user_uuid'] = $user_uuid;
|
||||
$userHashigherGroupWeight = false;
|
||||
if ($admin_data['user_group_weight'] > $_SESSION['user']['user_group_weight']) {
|
||||
$userHashigherGroupWeight = true;
|
||||
};
|
||||
}
|
||||
|
||||
$API_token = new API_apitoken();
|
||||
$requiredFields = ['user_uuid' => ['type' => 'uuid']];
|
||||
@@ -237,15 +237,16 @@ if ($admin_data) { ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if ($API->checkPermissions('admin-access-admins-resetpassword', 'RW', true)) { ?>
|
||||
<?php }
|
||||
if ($API->checkPermissions('admin-access-admins-resetpassword', 'RW', true)) { ?>
|
||||
<form method="post" action="/api/v1/user/resetpassword/">
|
||||
<input type="hidden" name="user_uuid" value="<?php echo $user_uuid ?>">
|
||||
<input type="hidden" name="user_uuid" value="<?= $user_uuid ?>">
|
||||
<button class="btn btn-primary mt-2">
|
||||
<i class="fa-solid fa-lock"></i> <?php echo __('send_password_reset') ?>
|
||||
<i class="fa-solid fa-lock"></i> <?= __('send_password_reset') ?>
|
||||
</button>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
reset the verified email (to be made)<br>
|
||||
</div>
|
||||
</div>
|
||||
@@ -304,7 +305,7 @@ if ($admin_data) { ?>
|
||||
<td>
|
||||
<label class="switch">
|
||||
<input type="checkbox" class="checkbox" data-api-data='<?php echo json_encode(['api_token_uuid' => $token_data['api_token_uuid'], 'api_token_revoked' => $token_data['api_token_revoked'] ? 1 : 0]) ?>' data-api-changevalue="api_token_revoked" data-api-url="/api/v1/user/apitoken/" <?php echo((($token_data['api_token_revoked'])) ? 'checked' : '') ?> <?php echo($userHashigherGroupWeight ? '' : 'disabled') ?>>
|
||||
<div class="slider"></div>
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</td>
|
||||
<?php if ($API_token->checkPermissions('user-apitoken-others', 'RW', true)) { ?>
|
||||
@@ -329,7 +330,7 @@ if ($admin_data) { ?>
|
||||
<h4>User history</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
To be made. Its going show the history of the administrator.
|
||||
To be made. It's going show the history of the administrator.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user