It is reported that Al-A’mash (rahimahullaah)
said:
They (the Salaf) never used to ask about [the religious condition of] a man after knowing three things about him: where & upon whom he entered, where & with whom he walked, & the close company he kept.
Meaning: Knowing these things about a man is more than sufficient for knowing whether he is following the right path on the Sunnah or not.
Ibn Battah, Al-Ibānah article 419.