عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ رَضِيَ اللَّهُ عَنْهُمَا أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ: ((مَنْ أَكَلَ ثُومًا أَوْ بَصَلًا فَلْيَعْتَزِلْنَا، أَوْ قَالَ: فَلْيَعْتَزِلْ مَسْجِدَنَا وَلْيَقْعُدْ فِي بَيْتِهِ))
It is narrated from Sayyiduna Jabir bin Abdullah, may Allah be pleased with him, that the Messenger of Allah, peace and blessings be upon him, said: Whoever eats garlic or onion should keep away from us or from our mosque and stay in his house.