I notice you say your friend is an illegal. If he is and was not allowed to adjust (no 245i) then he cannot adjust anyway based on marriage so it does not matter if he is married or not. My answer above assumes he was 245i eligible and actually could petition.