It was narrated that Jabir said: "The Messenger of Allah ﷺ said: 'Whoever eats of this plant' - the first time he said 'garlic' then he said, 'garlic, onions and leeks' 1 - 'let him not approach us in our Masjids, for the angels are offended by that which offends mankind'." 1 In Fath, Al-Bari, Ibn Hajar is of the opinion that it was Ibn Juraij who was talking, explaining that 'Ata' - who reported it from Jabir - narrated it both ways.
The values taught in this hadith include respect for places of worship, consideration for others’ feelings, and mindfulness of one’s own actions. We must remember that even though we may not see or hear them directly, there are spiritual beings around us at all times who can be affected by our behavior. Therefore it is important to always act with respect and consideration towards those around us both physically and spiritually.