Without a CoA (Certificate of Approval) the Register Office shouldn't have accepted their application for marriage - the Register Office should have asked for proof of nationality/residency.
The Homeoffice will always tell an overstayer to leave the UK....