The impostor convinced everyone he was a doctor until his fake credentials were discovered.
The man turned out to be an impostor posing as a doctor.