That the Messenger of Allah (ﷺ) said: "Whoever eats from these - the first time, he said garlic, then he said - garlic, onion, and leek, then let him not approach our Masjid."

This Hadith is Hasan Sahih.

He said: There are narrations on this topic from 'Umar, Abu Ayyub, Abu Hurairah, Abu Sa'eed, Jabir bin Samurah, Qurrah and Ibn 'Umar.
Jami` at-Tirmidhi Book 25, Hadith 20