حَدَّثَنَا مُعَاوِيَةُ بْنُ قُرَّةَ عَنْ أَبِيهِ رَضِيَ اللَّهُ عَنْهُ قَالَ نَهَى رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ عَنْ هَاتَيْنِ الشَّجَرَتَيْنِ الْخَبِيثَتَيْنِ وَقَالَ مَنْ أَكَلَهُمَا فَلَا يَقْرَبَنَّ مَسْجِدَنَا وَقَالَ إِنْ كُنْتُمْ لَا بُدَّ آكِلِيهِمَا فَأَمِيتُوهُمَا طَبْخًا قَالَ يَعْنِي الْبَصَلَ وَالثُّومَ
It is narrated from Sayyiduna Qurrah (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) forbade those two foul trees (onion and garlic) and said: Whoever eats these two things should by no means come near our mosque, and if you must eat them, then cook them (so that the odor is eliminated). By these, the Prophet (peace and blessings be upon him) meant onion and garlic.