Umar bin Khattab reported,

The Prophet ﷺ said, "Whoever prays in a mosque with the congregation for forty nights, never missing the first rakah of the evening prayer, Allah will record for him on account of it a release from the Fire."

Ibn Majah 798

Daif

حدثنا عثمان بن أبي شيبة حدثنا إسمعيل بن عياش عن عمارة بن غزية عن أنس بن مالك

عن عمر بن الخطاب

عن النبي ﷺ أنه كان يقول من صلى في مسجد جماعة أربعين ليلة لا تفوته الركعة الأولى من صلاة العشاء كتب الله له بها عتقا من النار

ابن ماجه 798ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Mosques and congregations
Chapter
Isha and Fajr prayers in congregation
Numbering
Darussalam 798
Ibn Majah 798