Jami` at-Tirmidhi, Book 49, Hadith 4274 (In-Book) ⓘ
Narrated Shu'bah: from 'Adi bin Thabit, from Al-Bara bin 'Azib, that he heard the Prophet, or - he said: "The Prophet said, about the Ansar: 'No one loves them except a believer, and no one hates them except a hypocrite. Whoever loves them, then Allah loves him, and whoever hates them then Allah hates him.'" So we said to him: "Did you hear this from Al-Bara?" He said: "He narrated it to me."
حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، بُنْدَارٌ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ عَدِيِّ بْنِ ثَابِتٍ، عَنِ الْبَرَاءِ بْنِ عَازِبٍ، أَنَّهُ سَمِعَ النَّبِيَّ صلى الله عليه وسلم أَوْ قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم فِي الأَنْصَارِ " لاَ يُحِبُّهُمْ إِلاَّ مُؤْمِنٌ وَلاَ يَبْغَضُهُمْ إِلاَّ مُنَافِقٌ مَنْ أَحَبَّهُمْ فَأَحَبَّهُ اللَّهُ وَمَنْ أَبْغَضَهُمْ فَأَبْغَضَهُ اللَّهُ " . فَقُلْتُ لَهُ أَأَنْتَ سَمِعْتَهُ مِنَ الْبَرَاءِ فَقَالَ إِيَّاىَ حَدَّثَ . قَالَ هَذَا حَدِيثٌ صَحِيحٌ .
also referenced under: Hadith 3900 (Reference) & Volume 6, Book 46, Hadith 3900 (DarusSalam)