$value) { if (str_starts_with($key, $sessionAccountPrefix)) { unset($_SESSION[$key]); logNewMessage(LOG_NOTICE, "del " . $key); } } $typeManager = new TypeManager(); if (isset($_POST['type']) && ($typeManager->getConfiguredType($_POST['type']) === null)) { logNewMessage(LOG_ERR, 'Invalid type: ' . $_POST['type']); die(); } if (isset($_GET['type']) && isset($_SESSION['delete_dn'])) { $typeId = $_GET['type']; $type = $typeManager->getConfiguredType($typeId); if ($type === null) { logNewMessage(LOG_ERR, 'Invalid type id: ' . $typeId); die(); } if (!checkIfDeleteEntriesIsAllowed($type->getId()) || !checkIfWriteAccessIsAllowed($type->getId())) { logNewMessage(LOG_ERR, 'User tried to delete entries of forbidden type '. $type->getId()); die(); } // Create account list $users = []; foreach ($_SESSION['delete_dn'] as $dn) { $start = strpos ($dn, "=")+1; $end = strpos ($dn, ","); $users[] = substr($dn, $start, $end-$start); } $sessionKey = $sessionAccountPrefix . (new DateTime('now', getTimeZone()))->getTimestamp() . generateRandomText(); //load account $_SESSION[$sessionKey] = new accountContainer($type, $sessionKey); // Show HTML Page include __DIR__ . '/../lib/adminHeader.inc'; echo "