The Messenger of Allah ﷺ said, "Let those men who live around the masjid and do not attend the evening prayer put an end to this, or I will burn down their houses around them with bundles of firewood."
وبإسناده أن رسول الله ﷺ قال لينتهين رجال من حول المسجد لا يشهدون العشاء أو لأحرقن حول بيوتهم بحزم الحطب
Its isnad is sahih. Bukhari and Ibn Majah also related it from Usamah with the wording, "Men will stop abandoning the congregation, or I will burn down their houses." Bukhari also related, through his own chain, from Abu Hurairah, "I had resolved to order that firewood be gathered, then order that the prayer be called, and that the call be given for it."Bukhari related it in the Book of Prayer from Abdullah bin Yusuf, and in the Book of Rulings from Ismail. Muslim related it there from Amr Naqid, Nasai in the Book of Prayer from Qutayba, and Malik in Muwatta from Abu Zinad.