وَحَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا هُشَيْمٌ، عَنْ إِسْمَاعِيلَ بْنِ أَبِي خَالِدٍ، عَنْ قَيْسٍ، عَنْ أَبِي مَسْعُودٍ الأَنْصَارِيِّ، قَالَ جَاءَ رَجُلٌ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ إِنِّي لأَتَأَخَّرُ عَنْ صَلاَةِ الصُّبْحِ مِنْ أَجْلِ فُلاَنٍ مِمَّا يُطِيلُ بِنَا ‏.‏ فَمَا رَأَيْتُ النَّبِيَّ صلى الله عليه وسلم غَضِبَ فِي مَوْعِظَةٍ قَطُّ أَشَدَّ مِمَّا غَضِبَ يَوْمَئِذٍ فَقَالَ ‏"‏ يَا أَيُّهَا النَّاسُ إِنَّ مِنْكُمْ مُنَفِّرِينَ فَأَيُّكُمْ أَمَّ النَّاسَ فَلْيُوجِزْ فَإِنَّ مِنْ وَرَائِهِ الْكَبِيرَ وَالضَّعِيفَ وَذَا الْحَاجَةِ ‏"‏ ‏.‏
Translation
Hammam b. Munabbih reported

This is what Abu Huraira transmitted to us from Muhammad the Messenger of Allah (ﷺ), and he narrated (some) ahadith out of (these narrations and one of them is this): The Messenger of Allah (ﷺ) said: When any one of you stands to lead people In prayer, he should shorten it, for amongst them are the aged, and amongst them are the weak, but when he prays by himself, he may prolong his prayer as he likes.