diff --git a/totp.php b/totp.php index 37a8462bc..94106c0d7 100644 --- a/totp.php +++ b/totp.php @@ -89,6 +89,11 @@ } else { $invalidTotp = true; } + } else { + $statement = $db->prepare('UPDATE totp SET last_totp_used = :last_totp_used WHERE user_id = :id'); + $statement->bindValue(':last_totp_used', time(), SQLITE3_INTEGER); + $statement->bindValue(':id', $_SESSION['totp_user_id'], SQLITE3_INTEGER); + $statement->execute(); } if ($valid) {