It is narrated from Sayyiduna Jabir, may Allah be pleased with him, that the Prophet, peace and blessings be upon him, forbade eating onions and garlic. But when we were overcome by necessity, we ate them. Upon this, the Prophet, peace and blessings be upon him, said: Whoever eats from this foul-smelling tree should not come near our mosques, for that which causes harm to humans also causes harm to the angels.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 15014
Hadith Gradingحکم دارالسلام:إسناده صحيح، خ: 854، م: 564، وأبو زبیر قد صرح بالسماع عند أبي عوانة: 411/1، وھو متابع أیضاً