Tariq reported,

A man became ritually impure and did not pray. He came to the Prophet ﷺ and mentioned this to him, and the Prophet said, "You did the right thing."Then another man became ritually impure, performed tayammum, and prayed. He came to the Prophet, who said to him something similar to what he had said to the other, meaning, "You did the right thing."

Nasai 325

Sahih

أخبرنا محمد بن عبد الأعلى قال حدثنا خالد قال أنبأنا شعبة أن مخارقا أخبرهم

عن طارق

أن رجلا أجنب فلم يصل فأتى النبي ﷺ فذكر ذلك له فقال أصبت فأجنب رجل آخر فتيمم وصلى فأتاه فقال نحو ما قال للآخر يعني أصبت

النسائي 325صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Purification
Chapter
One who finds neither water nor earth
Numbering
Darussalam 325
Nasai 325