عن ابن عمر رضي الله عنه أن النبي صلى الله عليه وسلم قال‏:‏ ‏"‏من أكل من هذه الشجرة -يعني الثوم- فلا يقربن مسجدنا‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏ وفي رواية لمسلم‏:‏ ‏"‏مساجدنا‏"‏‏.‏
Copy
It has been narrated that 'Umar (May Allah be pleased with him) said in the sermon of Friday prayer

"O you people! You eat garlic and onion. I think the odour of these to be very offensive. I saw that if the Messenger of Allah (ﷺ) happened to find a man with such offensive odour in the mosque, he would order him to be taken out of the mosque and sent to Al-Baqi'. He who wants to eat any of these, should cook them till their odour dies out.[Muslim].