Sunan Abi Dawud Book 2, Hadith 203
The Prophet (ﷺ) said: There are three types of people whose prayer is not accepted by Allah: One who goes in front of people when they do not like him; a man who comes dibaran, which means that he comes to it too late; and a man who takes into slavery an emancipated male or female slave.
The Messenger of Allah(ﷺ) used to visit her at her house. He appointed a mu’adhdhin to call adhan for her; and he commanded her to lead the inmates of her house in prayer. ‘Abd al-Rahman said: I saw her mu’adhdhin who was an old man.
The obligatory prayer is essential behind every Muslim, pious or impious, even if he has committed a sins.