The Messenger of Allah ﷺ said, "A person follows the religion of his close friend, so let each of you look carefully at whom he keeps company with."Muammal's version has, "at whom he befriends."
حدثنا عبد الرحمن ومؤمل قالا حدثنا زهير بن محمد قال مؤمل الخراساني حدثنا موسى بن وردان
قال رسول الله ﷺ المرء على دين خليله فلينظر أحدكم من يخالط وقال مؤمل من يخالل
Its isnad is sahih. As for his statement "Muammal said, the Khurasani," this means that Muammal bin Ismail, the second sheikh for Ahmad in this hadith, when he narrated it to him, said, "Zuhayr bin Muhammad the Khurasani told us." He added this ascription beyond the narration of Abdul-Rahman bin Mahdi, who did not mention it in his account from him.Musa bin Wardan al-Masri, his reliability was established earlier at 444, and we add here that Bukhari gave his biography in al-Kabir 4/1/297, as did Ibn Abu Hatim 4/1/165-166, and the hadith appears in Jami al-Masanid wal-Sunan 7:382 taken from this location. It was also narrated by Abu Dawud 4833 and Tirmidhi 3:278, both by way of Zuhayr bin Muhammad, through the same chain. Its wording has "the man" in place of "the person." Tirmidhi said, This is a hasan gharib hadith, and his commentator quoted Nawawi as saying, Its isnad is sahih.