Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates that the Prophet (peace and blessings be upon him) said: "Love for the Ansar is the sign (that distinguishes) every believer and hypocrite. Whoever loves the Ansar loves them because of his love for me, and whoever hates the Ansar hates them because of his hatred for me."
(Allamah al-Haythami says:) I say:
This narration is in the Sahih in abbreviated form.
Abu Ya'la recorded it; its chain contains the narrator Kurayd bin Rawahah, who is da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب المناقب / 16522