|
@@ -42,16 +42,15 @@ $limit = isset($input["limit"]) ? (int)$input["limit"] : 10; // Par défaut: 10
|
|
|
|
|
|
|
|
// Requête GET vers l'API Lucca avec filtre par login
|
|
// Requête GET vers l'API Lucca avec filtre par login
|
|
|
// Documentation: https://developers.lucca.fr/api-reference/legacy/directory/list-users
|
|
// Documentation: https://developers.lucca.fr/api-reference/legacy/directory/list-users
|
|
|
-// ✅ Activation du mode debug pour obtenir les erreurs détaillées
|
|
|
|
|
$result = lucca_request('GET', '/api/v3/users', [
|
|
$result = lucca_request('GET', '/api/v3/users', [
|
|
|
'login' => $username,
|
|
'login' => $username,
|
|
|
'fields' => 'id,name,login,mail,dtContractStart,dtContractEnd,employeeNumber,department,manager,culture',
|
|
'fields' => 'id,name,login,mail,dtContractStart,dtContractEnd,employeeNumber,department,manager,culture',
|
|
|
'limit' => $limit
|
|
'limit' => $limit
|
|
|
-], null, 20, true); // debug=true
|
|
|
|
|
|
|
+], null, 20, false); // debug désactivé - l'API Lucca ne supporte pas $debug sur /users
|
|
|
|
|
|
|
|
// DEBUG: Afficher toutes les informations
|
|
// DEBUG: Afficher toutes les informations
|
|
|
$debug_info = [
|
|
$debug_info = [
|
|
|
- "url_construite" => rtrim(LUCCA_API_BASE, '/') . '/api/v3/users?login=' . urlencode($username) . '&fields=...&$debug=true',
|
|
|
|
|
|
|
+ "url_construite" => rtrim(LUCCA_API_BASE, '/') . '/api/v3/users?login=' . urlencode($username) . '&fields=...&limit=' . $limit,
|
|
|
"username_recherche" => $username,
|
|
"username_recherche" => $username,
|
|
|
"curl_result" => $result
|
|
"curl_result" => $result
|
|
|
];
|
|
];
|