ENOfficial
Abu Hurairah narrated that the Messenger of Allah(s.a.w) said: "A man is upon the religion of his friend, so let one of you look at whom he befriends."
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا أَبُو عَامِرٍ، وَأَبُو دَاوُدَ قَالاَ حَدَّثَنَا زُهَيْرُ بْنُ مُحَمَّدٍ، حَدَّثَنِي مُوسَى بْنُ وَرْدَانَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " الرَّجُلُ عَلَى دِينِ خَلِيلِهِ فَلْيَنْظُرْ أَحَدُكُمْ مَنْ يُخَالِلُ " . قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ .
sunnah.com