Abdullah bin Umar reported,

The Messenger of Allah ﷺ said, "Whoever has eaten anything from this tree should not come to the mosque."

Ibn Majah 1016

Sahih

حدثنا محمد بن الصباح حدثنا عبد الله بن رجاء المكي عن عبيد الله بن عمر عن نافع

عن ابن عمر قال

قال رسول الله ﷺ من أكل من هذه الشجرة شيئا فلا يأتين المسجد

ابن ماجه 1016صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
One who eats garlic should not approach the masjid
Numbering
Darussalam 1016
Ibn Majah 1016