حَدَّثَنَا حَجَّاجُ بْنُ مِنْهَالٍ، حَدَّثَنَا شُعْبَةُ، قَالَ أَخْبَرَنِي عَدِيُّ بْنُ ثَابِتٍ، قَالَ سَمِعْتُ الْبَرَاءَ ـ رضى الله عنه ـ قَالَ سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم أَوْ قَالَ قَالَ النَّبِيُّ صلى الله عليه وسلم الأَنْصَارُ لاَ يُحِبُّهُمْ إِلاَّ مُؤْمِنٌ، وَلاَ يُبْغِضُهُمْ إِلاَّ مُنَافِقٌ، فَمَنْ أَحَبَّهُمْ أَحَبَّهُ اللَّهُ، وَمَنْ أَبْغَضَهُمْ أَبْغَضَهُ اللَّهُ "
Narrated Al-Bara:
I heard the Prophet (ﷺ) saying (or the Prophet (ﷺ) said), "None loves the Ansar but a believer, and none hates them but a hypocrite. So Allah will love him who loves them, and He will hate him who hates them."
Reference: Sahih al-Bukhari 3783
In-book : Book 63, Hadith 8
USC-MSA web (English) : Vol. 5, Book 58, Hadith 127 (deprecated)