Sunan an-Nasa'i, Book 14, Hadith 1419 (In-Book) ⓘ
It was narrated that Iyad bin 'Abdullah said: "I heard Abu Sa'eed Al-Khudri say: 'A man who appeared shabbily came on a Friday, while the Prophet was delivering the Khutbah. The Messenger of Allah said to him: 'Have you prayed?" He said: 'No." He said: 'Pray two rak'ahs.' And he urged the people to give in charity. They gave clothes, and he gave him two garments. The following Friday, he came when the Messenger of Allah was delivering the khutbah, and he urged the people to give charity. (That man) gave one of his two garments and the Messenger of Allah said: 'This man came last Friday looking shabby, and I commanded the people to give charity and they gave clothes, and I said that he should be given two garments, and now he came and I commanded the people to give charity and he gave one of them. So he chided himself and said: Take your garment.'"
أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ يَزِيدَ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنِ ابْنِ عَجْلاَنَ، عَنْ عِيَاضِ بْنِ عَبْدِ اللَّهِ، قَالَ سَمِعْتُ أَبَا سَعِيدٍ الْخُدْرِيَّ، يَقُولُ جَاءَ رَجُلٌ يَوْمَ الْجُمُعَةِ وَالنَّبِيُّ صلى الله عليه وسلم يَخْطُبُ بِهَيْئَةٍ بَذَّةٍ فَقَالَ لَهُ رَسُولُ اللَّهِ صلى الله عليه وسلم " أَصَلَّيْتَ " . قَالَ لاَ . قَالَ " صَلِّ رَكْعَتَيْنِ " . وَحَثَّ النَّاسَ عَلَى الصَّدَقَةِ فَأَلْقُوا ثِيَابًا فَأَعْطَاهُ مِنْهَا ثَوْبَيْنِ فَلَمَّا كَانَتِ الْجُمُعَةُ الثَّانِيَةُ جَاءَ وَرَسُولُ اللَّهِ صلى الله عليه وسلم يَخْطُبُ فَحَثَّ النَّاسَ عَلَى الصَّدَقَةِ - قَالَ - فَأَلْقَى أَحَدَ ثَوْبَيْهِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " جَاءَ هَذَا يَوْمَ الْجُمُعَةِ بِهَيْئَةٍ بَذَّةٍ فَأَمَرْتُ النَّاسَ بِالصَّدَقَةِ فَأَلْقُوا ثِيَابًا فَأَمَرْتُ لَهُ مِنْهَا بِثَوْبَيْنِ ثُمَّ جَاءَ الآنَ فَأَمَرْتُ النَّاسَ بِالصَّدَقَةِ فَأَلْقَى أَحَدَهُمَا " . فَانَتْهَرَهُ وَقَالَ " خُذْ ثَوْبَكَ " .
also referenced under: Volume 2, Book 14, Hadith 1409 (DarusSalam)