The Messenger of Allah ﷺ forbade eating of onions and leek. When we were overpowered by a desire (to eat) we ate them. Upon this he (the Holy Prophet) said: He who eats of this offensive plant must not approach our mosque, for the angels are harmed by the same things as men. (Using translation from Muslim 564a)
نَهَى رَسُولُ اللهِ ﷺ عَنِ الْبَصَلِ وَالْكُرَّاثِ فَغَلَبَتْنَا الْحَاجَةُ فَأَكَلْنَا مِنْهُ فَقَالَ النَّبِيُّ ﷺ مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ الْخَبِيثَةِ فَلَا يَقْرَبَنَّ مَسَاجِدَنَا؛ فَإِنَّ الْمَلَائِكَةَ تَتَأَذَّى مِمَّا يَتَأَذَّى مِنْهُ الْإِنْسَانُ