Packet-Fence/admin/configuration/role_details_function.php
2025-06-28 06:23:17 +05:30

23 lines
687 B
PHP

<?php
if (isset($_POST['id'])) {
if (isset($response['items']) && is_array($response['items'])) {
$user_list = array_map(function($user) {
return [
'id' => $user['id'] ?? '-',
'notes' => $user['notes'] ?? '-',
'parent_id' => $user['parent_id'] ?? '-',
'max_nodes_per_pid' => $user['max_nodes_per_pid'] ?? '-'
];
}, $response['items']);
// Filter the user list to get the user with pid='sugeorg'
$user_details_fetch = array_filter($user_list, function($user) {
$_SESSION["id_test"]=$_POST['id'];
return $user['id'] === $_POST['id'];
});
}
}
?>