It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) noticed an unpleasant smell in the mosque and said: "Whoever has eaten anything from this offensive plant, let him not enter our mosque." By this he (peace and blessings be upon him) meant garlic.
Hadith Referenceمسند أبي يعلى الموصلي / مسند أبي هريرة رضي الله عنه / 6118
Hadith Gradingمحدثین:إسناده حسن
Hadith Takhrij«حکم الحدیث مسند ابی یعلی محققاً تنسیق حسين سليم أسد - مکتبہ شاملہ :قال حسين سليم أسد: إسناده حسن . » «قال سعيد بن محمد السناري: صحيح: مضى سابقًا [برقم 5916]» «أخرجه سنن ابن ماجه برقم: 1015، وأخرجه مسند أحمد برقم: 9260، وأخرجه مسند البزار برقم: 2905، مسند ابویعلیٰ ترقیم الاثری: 6092»