Ibn 'Umar reported:The Messenger of Allah (ﷺ) said during the battle of Khaybar: He who ate of this plant, i. e. garlic, should not come to the mosques. In the narration of Zubair, there is only a mention of" battle" and not of Khaybar
Ibn 'Umar reported:The Messenger of Allah (ﷺ) said: He who eats of this (offensive) plant must not approach our mosque, till its odor dies: (plant signifies) garlic
Ibn Suhaib reported:Anas was asked about the garlic; he stated that the Messenger of Allah (ﷺ) had said: He who eats of this plant (garlic) should not approach us and pray along with us
Abu Huraira reported:The Messenger of Allah (ﷺ) said: He who eats of this plant (garlic) should not approach our mosque and should not harm us with the odour of garlic
Jabir reported: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
Jabir reported:The Messenger of Allah (ﷺ) said: He who eats garlic or onion should remain away from us or from our mosque and stay in his house. A kettle was brought to him which had (cooked) vegetables in it, He smelt (offensive) odour in it. On asking he was informed of the vegetables (cooked in it). He said: Take it to such and such Companion. When he saw it, he also disliked eating it. (Upon this). he (the Holy Prophet) said: You may eat it, for I converse wkh one with whom you do not converse
Ibn Juraij has narrated it with the same chain of transmitters:He who eats of this plant, i. e. garlic, should not come to us in our mosque, and he made no mention of onions or leek
Ҳадис 1256 — Sahih Muslim 5:94
وَحَدَّثَنِي عَمْرٌو النَّاقِدُ، حَدَّثَنَا إِسْمَاعِيلُ ابْنُ عُلَيَّةَ، عَنِ الْجُرَيْرِيِّ، عَنْ أَبِي نَضْرَةَ، عَنْ أَبِي سَعِيدٍ، قَالَ لَمْ نَعْدُ أَنْ فُتِحَتْ، خَيْبَرُ فَوَقَعْنَا أَصْحَابَ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي تِلْكَ الْبَقْلَةِ الثُّومِ وَالنَّاسُ جِيَاعٌ فَأَكَلْنَا مِنْهَا أَكْلاً شَدِيدًا ثُمَّ رُحْنَا إِلَى الْمَسْجِدِ فَوَجَدَ رَسُولُ اللَّهِ صلى الله عليه وسلم الرِّيحَ فَقَالَ " مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ الْخَبِيثَةِ شَيْئًا فَلاَ يَقْرَبَنَّا فِي الْمَسْجِدِ " . فَقَالَ النَّاسُ حُرِّمَتْ حُرِّمَتْ . فَبَلَغَ ذَاكَ النَّبِيَّ صلى الله عليه وسلم فَقَالَ " أَيُّهَا النَّاسُ إِنَّهُ لَيْسَ بِي تَحْرِيمُ مَا أَحَلَّ اللَّهُ لِي وَلَكِنَّهَا شَجَرَةٌ أَكْرَهُ رِيحَهَا " .
Abu Sa'id reported:We made no transgression but Khaybar was conquered. We, the Companions of the Messenger of Allah (ﷺ), fell upon this plant. i e. garlic. because the people were hungry. We ate it to our heart's content and then made our way towards the mosque. The Messenger of Allah (ﷺ) sensed its odour and he said: He who takes anything of this offensive plant must not approach us in the mosque. The people said: Its (use) has been forbidden; its (use) bu been forbidden. This reached the Messenger of Allah (ﷺ) and he said: O people, I cannot forbid (the use of a thing) which Allah has made lawful, but (this garlic) is a plant the odour of which is repugnant to me
Abu Sa'id al-Khudri reported:The Messenger of Allah (ﷺ) along with his Companions happened to pass by a field in which onions were sown. The people stopped there and ate out of that, but some of them did not eat. Then they (Propbet's Companions) went to him. He (first) called those who had not eaten the onions and kept the others (who had taken onions) waiting till its odour vanished