It is narrated from Sayyiduna Amr bin Murrah (may Allah be pleased with him) that he said to Sayyiduna Mu'awiyah (may Allah be pleased with him): I heard the Messenger of Allah (peace and blessings be upon him) saying: "There is no ruler who shuts his door on the needy, those in want and the poor, except that Allah Almighty also shuts the gates of heaven upon him at the time of his need, want and poverty."
Hadith Referenceمسند أبي يعلى الموصلي / مسند عمرو بن مرة / 1565
Hadith Takhrij«قال سعيد بن محمد السناري: صحيح» «أخرجه سنن الترمذي برقم: 1332، وأخرجه مسند أحمد برقم: 17572، وأخرجه فتح الباري برقم: 6735، وأخرجه رياض الصالحين برقم: 689، وأخرجه إتحاف الخيرة المهرة بزوائد المسانيد العشرة برقم: 4882/6، وأخرجه الأموال لابن زنجويه برقم: 8، مسند ابویعلیٰ ترقیم الاثری: 1562»