Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:5275[Chain 1] Abū Zakariyyā Yaḥyá b. Ibrāhīm b. Muḥammad b. Yaḥyá > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > al-Rabīʿ b. Sulaymān > al-Shāfiʿī > Mālik [Chain 2] Abū al-Ḥasan ʿAlī b. Aḥmad b. ʿAbdān > Aḥmad b. ʿUbayd al-Ṣaffār > Ismāʿīl b. Isḥāq al-Qāḍī > ʿAbdullāh / al-Qaʿnabī > Mālik > Abū al-Zinād > al-Aʿraj > Abū Hurayrah

[Machine] On the authority of the Prophet ﷺ , he said: "When one of you prays among the people, let him shorten it, for among them there may be sick and weak. But when one of you prays for himself, let him prolong it as much as he wishes." In another narration by Ash-Shafi'i, it is reported that the Messenger of Allah ﷺ said: "When one of you prays for the people, let him shorten it, for among them there may be sick and weak. But when one of you prays for himself, let him prolong it as much as he wishes."  

البيهقي:٥٢٧٥أَخْبَرَنَا أَبُو زَكَرِيَّا يَحْيَى بْنُ إِبْرَاهِيمَ بْنِ مُحَمَّدِ بْنِ يَحْيَى ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ أنبأ الرَّبِيعُ بْنُ سُلَيْمَانَ أنبأ الشَّافِعِيُّ أنبأ مَالِكٌ ح وَأَخْبَرَنَا أَبُو الْحَسَنِ عَلِيُّ بْنُ أَحْمَدَ بْنِ عَبْدَانَ أنبأ أَحْمَدُ بْنُ عُبَيْدٍ الصَّفَّارُ أنبأ إِسْمَاعِيلُ بْنُ إِسْحَاقَ الْقَاضِي ثنا عَبْدُ اللهِ يَعْنِي الْقَعْنَبِيَّ عَنْ مَالِكٍ عَنْ أَبِي الزِّنَادِ عَنِ الْأَعْرَجِ عَنْ أَبِي هُرَيْرَةَ

عَنِ النَّبِيِّ ﷺ أَنَّهُ قَالَ إِذَا صَلَّى أَحَدُكُمْ بِالنَّاسِ فَلْيُخَفِّفْ فَإِنَّ فِيهِمُ السَّقِيمَ وَالضَّعِيفَ وَالْكَبِيرَ وَإِذَا صَلَّى أَحَدُكُمْ لِنَفْسِهِ فَلْيُطَوِّلْ مَا شَاءَ وَفِي رِوَايَةِ الشَّافِعِيِّ أَنَّ رَسُولَ اللهِ ﷺ قَالَ إِذَا كَانَ أَحَدُكُمْ يُصَلِّي لِلنَّاسِ فَلْيُخَفِّفْ فَإِنَّ فِيهِمُ السَّقِيمَ وَالضَّعِيفَ فَإِذَا كَانَ يُصَلِّي لِنَفْسِهِ فَلْيُطِلْ مَا شَاءَ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ عَبْدِ اللهِ بْنِ يُوسُفَ عَنْ مَالِكٍ وَأَخْرَجَهُ مُسْلِمٌ مِنْ وَجْهٍ آخَرَ عَنْ أَبِي الزِّنَادِ وَزَادَ فِيهِ بَعْضُهُمُ الصَّغِيرَ

See similar narrations below:

Collected by Mālik
malik:8-14Yaḥyá > Mālik > Abū al-Zinād > al-Aʿraj > Abū Hurayrah

Yahya related to me from Malik from Abu'z Zinad from al-Araj from Abu Hurayra that the Messenger of Allah ﷺ said, "When you lead people in the prayer, make it short, because there are among them some people who are weak, ill and old. But when you pray on your own, make it as long as you wish."  

مالك:٨-١٤حَدَّثَنِي يَحْيَى عَنْ مَالِكٍ عَنْ أَبِي الزِّنَادِ عَنِ الأَعْرَجِ عَنْ أَبِي هُرَيْرَةَ

أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ إِذَا صَلَّى أَحَدُكُمْ بِالنَّاسِ فَلْيُخَفِّفْ فَإِنَّ فِيهِمُ الضَّعِيفَ وَالسَّقِيمَ وَالْكَبِيرَ وَإِذَا صَلَّى أَحَدُكُمْ لِنَفْسِهِ فَلْيُطَوِّلْ مَا شَاءَ