The Kentucky legislature is considering a bill that would give adulterous fathers paternal rights over the children of their adultery, even if the mother is married. The law, by contrast, assumes that all children born to a married woman are children of the marriage. In the past it might be difficult to prove paternity; now, DNA tests can tell us with assurance who the biological father is.
Nonetheless, I think the law is still right. If a married couple want to raise her child as theirs, they should. Marriage is a social institution of the highest value, especially for raising children. In all generations children who are cuckoos in the nest have nonetheless been raised successfully by parents who knew the score. If a man wants to have paternal rights, he should marry the mother of his child. If she is already married, society has already settled the question of who should have first claim on raising the child.