substr($module->OpenDesigner(), 5)]); return; } if ($path === '/__test/state') { header('Content-Type: application/json'); echo json_encode(['writes' => $fixture['writes'], 'accounts' => array_map(static fn(array $a): array => ['name' => $a['name'], 'enabled' => $a['enabled']], json_decode($fixture['attributes']['Accounts'], true))]); return; } if ($path === '/__test/reset' && $_SERVER['REQUEST_METHOD'] === 'POST') { $data = json_decode((string) file_get_contents('php://input'), true); $accounts = json_decode($fixture['attributes']['Accounts'], true); foreach ($accounts as $id => $a) if ($a['name'] === ($data['name'] ?? '')) { echo $module->ResetUserPassword($id, (string) ($data['password'] ?? '')); return; } } $module->hook();