<?php
if (isset($_POST['pid'])) {
  
  if (isset($response['items']) && is_array($response['items'])) {
      $user_list = array_map(function($user) {
          return [
             'id' => $user['id'] ?? '-',
             'description' => $user['description'] ?? '-',
             'dot1x_recompute_role_from_portal' => $user['dot1x_recompute_role_from_portal'] ?? '-',
             'autoregister' => $user['autoregister'] ?? '-',
             'status' => $user['status'] ?? '-',
             'sources' =>$user['sources'] ?? '-'
          ];
      }, $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['pid'];
          return $user['id'] === $_POST['pid'];
      });
   
  }
  }

  ?>