Sahih Muslim #2010 · The Book of Marriage

Sahih MuslimAdi b. Hatim reported
Sahih Muslim · Book 16 · The Book of Marriage
Sahih Muslim · كتاب 16 · كتاب النكاح
that a person recited a sermon before the Messenger of Allah (ﷺ) thus: He who obeys Allah and His Apostle, he in fact follows the right path, and he who disobeys both of them, he goes astray. Upon this the Messenger of Allah (ﷺ) said: What a bad speaker you are; say: He who disobeys Allah and His Apostle. Ibn Numair added: He in fact went astray.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَمُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ، قَالاَ حَدَّثَنَا وَكِيعٌ، عَنْ سُفْيَانَ، عَنْ عَبْدِ الْعَزِيزِ بْنِ رُفَيْعٍ، عَنْ تَمِيمِ بْنِ طَرَفَةَ، عَنْ عَدِيِّ بْنِ حَاتِمٍ، أَنَّ رَجُلاً، خَطَبَ عِنْدَ النَّبِيِّ صلى الله عليه وسلم فَقَالَ مَنْ يُطِعِ اللَّهَ وَرَسُولَهُ فَقَدْ رَشِدَ وَمَنْ يَعْصِهِمَا فَقَدْ غَوَى ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏
"‏ بِئْسَ الْخَطِيبُ أَنْتَ ‏.‏ قُلْ وَمَنْ يَعْصِ اللَّهَ وَرَسُولَهُ ‏"‏ ‏.‏ قَالَ ابْنُ نُمَيْرٍ فَقَدْ غَوِيَ ‏.‏
Reference : Sahih Muslim 2010In-book reference : Book 7, Hadith 60