Hadith.4269 - Umar ibn Udhaynah narrated from Muhammad ibn Muslim, from Abu Ja'far Imam Muhammad ibn Ali Al-Baqir (as), who said
I asked him about garlic.
Imam (as) said:
"The Messenger of Allah (swt) (peace be upon him and his family) only forbade it because of its smell.
Prophet (sw) said: 'Whoever eats this foul plant should not come near our mosque.' However, as for one who eats it and does not go to the mosque, there is no harm."