Narrated Ibn ‘Umar reported God’s Messenger as saying, "There are three people whose prayer is not accepted:
one who goes in front of people when they do not like him, a man who comes to prayer dibaran, which means that he comes to it too late, and a man who takes into slavery an emancipated female slave.”
Malik b. al-Huwairith used to come to our place of prayer and tell us traditions, and one day when the time for prayer came we told him to go forward and lead the prayer, but he said to us: Put one of your own men forward to lead you in prayer, and I shall tell you why I am unwilling to do so. I heard God’s Messenger say, "If anyone visits people he must not act as their imam, but one of their men must do so.”
Abu Dawud, Tirmidhi and Nasa’i transmitted it, but Nasa’i gave only the Prophet's words.