Main update
All checks were successful
Deploy / deploy-staging (push) Successful in 25s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-24 02:24:39 +02:00
parent 5ff4c3fb2b
commit d121f74bd0
34 changed files with 2548 additions and 67 deletions

View File

@@ -134,6 +134,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$pendingRequests = $registration->pendingApprovals();
$availableGroups = $registration->availableGroups();
$existingUsers = $registration->searchExistingUsers('', 250);
$selectedExistingUser = null;
if ($manualUsername !== '') {
foreach ($existingUsers as $existingUser) {
if (strtolower((string) ($existingUser['username'] ?? '')) === strtolower($manualUsername)) {
$selectedExistingUser = $existingUser;
break;
}
}
}
$selected = $selectedId !== ''
? $registration->find($selectedId)
: ($pendingRequests[0] ?? null);
@@ -348,17 +357,22 @@ ob_start();
<fieldset class="um-fieldset">
<legend>Gruppen fuer Aktivierung</legend>
<div class="um-checkbox-grid">
<?php foreach ($availableGroups as $group): ?>
<label class="window-app-item um-checkbox-item">
<input type="checkbox" name="manual_group_dns[]" value="<?= $h((string) ($group['dn'] ?? '')) ?>">
<span class="window-app-item-main">
<strong><?= $h((string) ($group['label'] ?? '')) ?></strong>
<p><?= $h((string) ($group['dn'] ?? '')) ?></p>
</span>
</label>
<?php endforeach; ?>
</div>
<div class="um-checkbox-grid">
<?php foreach ($availableGroups as $group): ?>
<?php
$groupDn = (string) ($group['dn'] ?? '');
$selectedGroupDns = array_values(array_map('strval', (array) ($selectedExistingUser['group_dns'] ?? [])));
$isChecked = in_array($groupDn, $selectedGroupDns, true);
?>
<label class="window-app-item um-checkbox-item">
<input type="checkbox" name="manual_group_dns[]" value="<?= $h($groupDn) ?>" <?= $isChecked ? 'checked' : '' ?>>
<span class="window-app-item-main">
<strong><?= $h((string) ($group['label'] ?? '')) ?></strong>
<p><?= $h($groupDn) ?></p>
</span>
</label>
<?php endforeach; ?>
</div>
</fieldset>
<div class="um-actions">