Speak with an attorney about this.
While marrying just after the citizen naturalized as a citizen might not be an enormous problem, the fact that the citizen originally got permanent residence through marriage to a citizen might be an issue, depending on how long ago this was.
The situation needs to be discussed with an attorney.
Probably the first question that needs to be answered is whether the "illegal immigrant" is eligible to adjust status in the US, or has to consular process abroad.
I don't suppose that whether you marry or not depends on the immigration consequences, but before you file anything with USCIS you should talk to an immigration attorney face to face. The attorney is going to have a lot of questions.
Law Office of Lamar Peckham
555 Sebastopol Rd., Ste. C
Santa Rosa, CA 95407