Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) narrates this statement of the Prophet (peace and blessings of Allah be upon him): "Whoever eats this vegetable, meaning garlic, onion, or leek, should not come to our mosques, because the angels are bothered by that which bothers humans."
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 1644
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الإرواء» (547): ق.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم.