Sunan at-Tirmithiy كتاب الصلاة باب ما جاء ما يقول الرجل إذا أذن المؤذن

حَدَّثَنَا مُحَمَّدُ بْنُ إِسْمَاعِيلَ حَدَّثَنَا عَلِىُّ بْنُ الْحَسَنِ حَدَّثَنَا الْحُسَيْنُ بْنُ وَاقِدٍ حَدَّثَنَا أَبُو غَالِبٍ قَالَ سَمِعْتُ أَبَا أُمَامَةَ يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ثَلاَثَةٌ لاَ تُجَاوِزُ صَلاَتُهُمْ آذَانَهُمُ الْعَبْدُ الآبِقُ حَتَّى يَرْجِعَ وَامْرَأَةٌ بَاتَتْ وَزَوْجُهَا عَلَيْهَا سَاخِطٌ وَإِمَامُ قَوْمٍ وَهُمْ لَهُ كَارِهُونَ. قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ غَرِيبٌ مِنْ هَذَا الْوَجْهِ. وَأَبُو غَالِبٍ اسْمُهُ حَزَوَّرٌ.
The Messenger of God, peace and blessings of God be upon him, said, "There are three [kinds of people] whose prayers do not go beyond their ears (are not accepted by God): the fugitive slave until he returns, a woman whose husband is still angry with her overnight, and a man who leads people in prayer despite being hated by them.(1)"
[1]This applies to Imāms who are transgressors, and not to those who follow the sunnah (the Prophet's tradition).