The Messenger of Allah ﷺ said something to that effect.
حدثنا الحسن بن علي حدثنا عبد الرزاق أخبرنا معمر عن زيد بن أسلم عن عطاء بن يسار
قال رسول الله ﷺ بمعناه
No references are available.
Its isnad is sahih. Ibn Majah narrated it in the chapter on zakat, section on who may lawfully receive charity, h:1841, from the hadith of Abdul-Razzaq. It is also found in his Musannaf, h:7151. Ibn Khuzayma graded it sahih, h:2374.