Sunan Abi Dawud, Hadith 5108 ⓘ
Anas b. Malik said : I never saw the Companions of the Messenger of Allah (May peace be upon him) so happy about anything as I saw them happy about this thing. A man said : Messenger of Allah! A man loves another man for the good work which he does, but he himself cannot do like it. The Messenger of Allah (May peace be upon him) said: A man will be with those whom he loves.
حَدَّثَنَا وَهْبُ بْنُ بَقِيَّةَ، حَدَّثَنَا خَالِدٌ، عَنْ يُونُسَ بْنِ عُبَيْدٍ، عَنْ ثَابِتٍ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ رَأَيْتُ أَصْحَابَ رَسُولِ اللَّهِ صلى الله عليه وسلم فَرِحُوا بِشَىْءٍ لَمْ أَرَهُمْ فَرِحُوا بِشَىْءٍ أَشَدَّ مِنْهُ قَالَ رَجُلٌ يَا رَسُولَ اللَّهِ الرَّجُلُ يُحِبُّ الرَّجُلَ عَلَى الْعَمَلِ مِنَ الْخَيْرِ يَعْمَلُ بِهِ وَلاَ يَعْمَلُ بِمِثْلِهِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " الْمَرْءُ مَعَ مَنْ أَحَبَّ " .
also referenced under: Hadith 5127 (DarusSalam) & Book 41, Hadith 5106 (USC-MSA)