Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:6:88

That is the guidance of Allah by which He guides whomever He wills of His servants. But if they had associated others with Allah, then worthless for them would be whatever they were doing.  

That, religion to which they were guided, is God’s guidance wherewith He guides whom He will of His servants; had they, hypothetically speaking, been idolaters, all that they did would have been in vain.
القرآن:٦:٨٨

ذَٰلِكَ هُدَى اللَّهِ يَهْدِي بِهِ مَنْ يَشَاءُ مِنْ عِبَادِهِ ۚ وَلَوْ أَشْرَكُوا لَحَبِطَ عَنْهُمْ مَا كَانُوا يَعْمَلُونَ  

{ذلك} الذين هُدوا إليه {هدى الله يهدي به من يشاء من عباده ولو أشركوا} فرضا {لحبط عنهم ما كانوا يعلمون}.