Question: If a man having five wives or more dies, is he considered a Muslim for whom we can offer the Funeral Prayer after his death, although we know that Allaah (Glorified be He) says (what means): Then do you believe in a part of the Scripture and reject the rest? Then what is the recompense of those who do so among you, except disgrace in the life of this world ?
Answer: True Eemaan (Faith) is not established by saying, “Laa ilaahaa illaa Allaah (there is no god but Allaah),” unless it is said sincerely from the heart. Allaah does not accept the Shahaadah (Testimony of Faith) unless it is sincere. In this world, anyone who pronounces the Shahaadah should be treated unconditionally as a Muslim.. read more here.