عن أبي هريرة أن النبي صلى الله عليه وسلم قال الرجل على دين خليله فلينظر أحدكم من يخالل (سنن أبي داود #4833)
Hazrat Abu Hurairah (radhiyallahu ‘anhu) reports that Rasulullah (sallallahu ‘alaihi wasallam) said, “A person will be on the deen of his friend (i.e. he will follow his ways, habits, mindset, etc in deen). Hence, you should look carefully at the person whom you befriend.”