Based on the hadith:


A person is on the religion of his friend, so he should be careful who he chooses as his friend.