The Prophet ﷺ prohibited eating onions and leeks during the time of Khaybar. Some people ate them anyway and then came to the mosque. The Prophet ﷺ asked, "Did I not forbid these two foul-smelling plants?"They replied, "Yes, Messenger of Allah, but hunger overwhelmed us."The Messenger of Allah ﷺ said, "Whoever eats them should not come to our mosque, for the angels are bothered by what bothers the children of Adam."
حدثنا الخزاعي أخبرنا حماد بن سلمة أخبرنا أبو الزبير
أن النبي ﷺ نهى زمن خيبر عن البصل والكراث فأكلهما قوم ثم جاءوا إلى المسجد فقال النبي ﷺ ألم أنه عن هاتين الشجرتين المنتنتين قالوا بلى يا رسول الله ولكن أجهدنا الجوع فقال رسول الله ﷺ من أكلهما فلا يحضر مسجدنا فإن الملائكة تتأذى مما يتأذى منه بنو آدم