Each situation is different. Yet, you should realize that only individuals that came here w/o visa cannot adjust their status.
If you get married here, and the undocumented person leaves the U.S., he could face a 3/10 bar. Only extreme hardship to his immediate relatives may help him in obtaining an unlawful presence waiver.

You should consult a competent attorney before making any crucial decisions.

Best regards,