It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that Ma'iz bin Malik (may Allah be pleased with him) came to the Prophet (peace and blessings be upon him) and said: I have committed adultery. So he (peace and blessings be upon him) turned away from him. Then he (peace and blessings be upon him) asked his people: "Is he insane?" They said: There is nothing wrong with him. He (peace and blessings be upon him) said: "Did you do it with her?" He said: Yes. So he (peace and blessings be upon him) ordered that he be stoned, and he was taken away (and stoned), and the Prophet (peace and blessings be upon him) did not lead his funeral prayer.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11895