Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) said: In the time of the Messenger (peace and blessings be upon him), people were taken to account through revelation. Now revelation has ceased, and now we take (people) to account by their outward deeds. Whoever's outward deeds are good, we trust him and bring him close, and the inner matter is with Allah Almighty. And whoever's outward deeds are bad, we neither trust him nor believe him, even if he says that his inner self is good.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب المرتد / 16850