It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever builds a mosque for Allah to see (that is, purely for Allah's pleasure), Allah will build for him a house in Paradise; and if he dies that same day, he is forgiven. And whoever digs a grave for Allah to see, Allah will build for him a house in Paradise; and if he dies that same day, he is forgiven."
Imam al-Tabarani (may Allah have mercy on him) said: "No one narrated these two hadiths from al-Hakam except Imran; Ali bin Uthman is alone in narrating both of them."
Hadith Referenceالمعجم الأوسط / باب الميم / 8476
Hadith Gradingمحدثین:إسناده ضعيف لضعف عمران بن عبيد الله، تفرد به
Hadith Takhrij«قال الدارقطني: زعم أن عمران تفرد به «الإعلام بسنته عليه الصلاة والسلام بشرح سنن ابن ماجه الإمام، ج 4، ص 167»» «قال الهيثمي: فيه عمران بن عبد الله وإنما هو ابن عبيد الله ذكره البخاري في تاريخه وقال فيه نظر وضعفه ابن معين أيضا وذكره ابن حبان في الثقات وسمى أباه عبد الله مكبرا «مجمع الزوائد ومنبع الفوائد، ج 2، ص 8»» «أخرجه أحمد فى «مسنده» برقم: 2191، والطيالسي فى «مسنده» برقم: 2739، وأبو يعلى فى «مسنده» برقم: 2534، والبزار فى «مسنده» برقم: 5080، وابن حجر فى «المطالب العالية» برقم: 352 / 1، 352 / 2، وابن أبي شيبة فى «مصنفه» برقم: 3176، والطحاوي فى «شرح مشكل الآثار» برقم: 1555»