مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ الْمُنْتِنَةِ، فَلَا يَقْرَبَنَّ مَسْجِدَنَا؛ فَإِنَّ الْمَلَائِكَةَ تَتَأَذَّى مِمَّا يَتَأَذَّى مِنْهُ الْإِنْسُ
Translation: Whoever eats from this strong-smelling plant should not approach our mosque while carrying the offensive smell, for angels are affected by what causes people discomfort.
Source: البخاري ومسلم
هَذِهِ الشَّجَرَةِ الْمُنْتِنَةِ means “this offensive-smelling plant”; this expression refers to a pungent plant such as onion. فَلَا يَقْرَبَنَّ is a strongly emphasized prohibition: “let him certainly not approach.” تَتَأَذَّى means “are caused discomfort.”
The concern is preventing distress to fellow worshippers. Attending while a strong offensive smell remains may disturb the congregation; the text does not establish a permanent ban on eating a lawful food.