A Person Is upon the Religion of His Companion
“O you who believe! Fear Allaah, and be with those who are true (in words and deeds)”
“And keep yourself (O Muhammad) patiently with those who call on their Lord (i.e. your companions who remember their Lord with glorification, praising in prayers, and other righteous deeds) morning and afternoon, seeking His Face”
This is why the Prophet ﷺ said: “A person is on the religion of his companions. Therefore let every one of you carefully consider the company he keeps.” [Tirmidhi]
Also, on the authority of Abu Musa al-Ash’ari رضي الله عنه the Prophet صلى الله عليه وسلم said:
“A good friend and a bad friend are like a perfume-seller and a blacksmith: The perfume-seller might give you some perfume as a gift, or you might buy some from him, or at least you might smell its fragrance. As for the blacksmith, he might singe your clothes, and at the very least you will breathe in the fumes of the furnace.”
Bukhari and Muslim
And the Prophet ﷺ: “The likeness of a good companion and a bad companion is that of a perfume seller and one who works the bellows. With the perfume seller, either he will give you something or you will buy something from him, or you will notice a good smell from him, but with the one who works the bellows, either he will burn your clothes or you notice a bad smell from him.” Narrated by Muslim, no. 2628.
It is reported that Sufyaan ath-Thawree (Allaah have mercy upon him) said: There is nothing that corrupts a person or rectifies him more than [his] companions. (Ibn Battah, Al-Ibaanah al-Kubraa, article 504)
Who are your friends and whose company you keep? They can be a factor to success or destruction in this life and/or the hereafter.