Or from Abu Haytham, from Abu Saeed, that the Prophet ﷺ said, "Do not befriend anyone except a believer, and let no one eat your food except one who is God-conscious."
حدثنا عمرو بن عون أخبرنا ابن المبارك عن حيوة بن شريح عن سالم بن غيلان عن الوليد بن قيس
أو عن أبي الهيثم عن أبي سعيد عن النبي ﷺ قال لا تصاحب إلا مؤمنا ولا يأكل طعامك إلا تقي
[Its isnad is sahih] Tirmidhi narrated it in Zuhd, chapter on what has been said about the companionship of the believer, no. 2395, from the hadith of Abdullah bin Mubarak, with this same wording, and he said, hasan. Ibn Hibban graded it sahih, no. 2049, 2050, as did Hakim, 4/128, and Dhahabi agreed with him.