feat(groups): user_groups lookup, admin assignment UI, public directory with DataTables

This commit is contained in:
2025-12-10 10:01:07 +01:00
parent 9094b58b6d
commit 2b6d4c49f5
8 changed files with 201 additions and 2 deletions

View File

@@ -22,6 +22,7 @@
<td>User's email</td>
<td>Activated ?</td>
<td>Link to user's profile</td>
<td>Group</td>
<td>suspension Time in days</td>
<td>Soft delete</td>
<td>Submit</td>
@@ -41,6 +42,19 @@
<td>
<a href="<?= Config::get('URL') . 'profile/showProfile/' . $user->user_id; ?>">Profile</a>
</td>
<td>
<form action="<?= Config::get('URL'); ?>admin/changeUserGroup" method="post">
<input type="hidden" name="user_id" value="<?= $user->user_id; ?>" />
<select name="group_id">
<?php foreach ($this->groups as $group) { ?>
<option value="<?= $group->group_id; ?>" <?= (isset($user->user_account_type) && (int)$user->user_account_type === (int)$group->group_id ? 'selected' : '') ?>>
<?= (int)$group->group_id; ?> - <?= htmlspecialchars($group->group_name, ENT_QUOTES, 'UTF-8'); ?>
</option>
<?php } ?>
</select>
<input type="submit" value="Save" />
</form>
</td>
<form action="<?= config::get("URL"); ?>admin/actionAccountSettings" method="post">
<td><input type="number" name="suspension" /></td>
<td><input type="checkbox" name="softDelete" <?php if ($user->user_deleted) { ?> checked <?php } ?> /></td>