Allah Says: “O Children of adam! Take your adornment (by wearing your clean clothes) while praying.” [surah al-A’raaf (7):31] Jaabir said: “The Messenger of Allah PBUH. asid: ‘Whoever eats garlic or onions, let him keep away from us,’ or ‘let him keep away from our mosque and stay in his house.'”51 According to a report narrated by Muslim, the Prophet PBUH. said: “Whoever eats onions, garlic or leeeks, let him not come near our masjid, for the angels are offended by what is offensive to the sons of Adam.”52 ‘Umar ibn al-Khattaab addressed the people one Friday and said: “O People, you eat two things that i think come from bad plants: onions and garlic. I saw the Messenger of Allaah; PBUH. when he noticed this smell coming from a man in the masjid, he ordered him to go out to al-baqee’. Whoever wants to eat these things, let him cook them until they lose their smell.”53 We might also include here those who come to the mosque straight from work, with unpleasant odors emanating from their armpits and socks. Even worse than these are smokers who have the habit of consuming their haraam cigaretters then coming to the masjid and distrubing the worshippers of Allah, people and angels alike with their smell.
——— 51 Reported by al-Bukhaari, see al-fath, 2/339. 52 Reported by Muslim, no. 1/395. 53 Reported by Muslim, 1/396.