If she's in a state that doesn't verify her immigration status before issuing a marriage license, or travels to such a state, she can marry her boyfriend consistent with the other laws (e.g., residency requirements) of the state involved.
If she is subject to the two year home residency requirement, she cannot adjust her status based on marriage until she either gets a waiver or fulfills that requirement.
If her husband cannot sponsor her, they will need to find a sponsor or cosponsor with sufficient income and resources.

