\n";
$row = $db->query("SELECT * FROM sessions WHERE id='$id'")->fetch();
if ($row == false) {
die("Session not found");
}
$username = $row['user'];
echo "User: " . $username . "@" . $row['realm'] . "
\n";
$user = $db->query("SELECT machine_managed,methods FROM users WHERE identity='$username'")->fetch();
if ($user == false) {
die("User not found");
}
echo "
\n";
$cert = $user['methods'] == "TLS" || strncmp($username, "cert-", 5) == 0;
if ($cert) {
echo "Complete user subscription remediation
\n";
} else if ($user['machine_managed'] == "1") {
echo "Complete user subscription remediation
\n";
echo "This will provide a new machine-generated password.
\n";
} else {
echo "\n";
}
?>