A man kissed a woman, then came to the Prophet ﷺ and told him about it. Allah then revealed, "And establish the prayer at the two ends of the day and during parts of the night. Indeed, good deeds wipe away bad deeds" [Hud 11:114].The man asked, "Messenger of Allah, is this for me?"He replied, "It is for all of my community."
أن رجلا أصاب من امرأة قبلة، فأتى النبي ﷺ فأخبره، فأنزل الله: {وأقم الصلوة طرفي النهار وزلفا من اليل إن الحسنت يذهبن السيئات} [سورة هود ١١٤] فقال الرجل: يا رسول الله! ألي هذا؟ قال: لجميع أمتي كلهم.
Bukhari narrated it in the Book of Prayer Times (526), and Muslim in the Book of Repentance (2763), both from Qutayba bin Saeed, who said, Yazid bin Zuray narrated to us, from Sulayman Taymi, from Abu Uthman Nahdi, from Ibn Masud, and he related the hadith. The wording given is Bukhari's, while in Muslim's wording it is "for whoever among my nation acts upon it."In another narration in Muslim, by way of Jareer, from Sulayman Taymi with his chain, he said, a man did something to a woman short of adultery, so he came to Umar bin Khattab, who treated the matter as grave, then he came to Abu Bakr, who treated it as grave, then he came to the Prophet ﷺ, and he related the same as the hadith of Yazid bin Zuray and Mutamir.