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. (Using translation from Muslim 870)
أَنَّ رَجُلًا خَطَبَ عِنْدَ النَّبِيِّ ﷺ فَقَالَ مَنْ يُطِعِ اللهَ وَرَسُولَهُ فَقَدْ رَشَدَ وَمَنْ يَعْصِهِمَا فَقَدْ غَوَى فَقَالَ رَسُولُ اللهِ ﷺ بِئْسَ الْخَطِيبُ أَنْتَ قُلْ وَمَنْ يَعْصِ اللهَ وَرَسُولَهُ