Can a married man ask for joint legal custody of a child that he had as a result of an affair?

First, he is considered the same as a single father under these circumstances, so he has not parental rights to begin with, so he must first petition the courts for a right to see the child. see links below