The person on the work permit needs to apply for a Certificate of Approval and have at least 6 months of leave remaining on the permit. They'll have to register at one of the designated offices and after the marriage can they can switch into a FLR(M) if they want to. Garry or Victoria, can you correct this if I'm wrong?
MTA: They don't have to leave the UK to get the COA, it can be done in-country.
OR you could do what my husband and I did. Rather than go through the hassle of the COA, we just went to the US to get married. He's British...and because he didn't intend to reside in the States after the wedding, he just went into the US as a regular tourist. And I came back into the UK, after the wedding trip, on my work permit. But as advised by my immigration attorney in Oxford, I also showed UK immigration our New Mexico marriage certificate and told them that I was not planning to get a spousal visa -- I will simply apply for ILR once I'm eligible by virtue of living & working in the UK long enough.
So the worst case for us would be if I lose my job between now and time for me to get ILR. But if that happens, I'll just go back to the US, apply for the spousal visa, and then come back into the UK again and look for a new position. It just means it'll take longer to be eligible for ILR, but it's not the end of the world.
In our case, we honestly didn't care whether we got married in the US or in the UK, so going home (for me) to get married was the easier option for us as a couple.
Good luck with your own situation!
Janet
(lordcelery.blogspot.com)