Someone said to Muawiya, "Muawiya, I heard the Messenger of Allah ﷺ say, 'There is no ruler or governor who shuts his door against those in need, hardship, and poverty except that Allah shuts the gates of heaven against his own need, hardship, and poverty.'"So Muawiya appointed a man to attend to the needs of the people.
حدثنا إسماعيل بن إبراهيم عن علي بن الحكم قال حدثني أبو حسن أن
لمعاوية يا معاوية إني سمعت رسول الله ﷺ يقول ما من إمام أو وال يغلق بابه دون ذوي الحاجة والخلة والمسكنة إلا أغلق الله عز وجل أبواب السماء دون حاجته وخلته ومسكنته قال فجعل معاوية رجلا على حوائج الناس
Its chain of transmission is daif, due to the unknown status of Abu Hasan Jazari Shami, whose condition was not known to them, as noted by Dhahabi and Ibn Hajar. As for Ali bin Hakam Banani, Abu Hakam Basri, he was deemed reliable by Ibn Saad, Abu Dawud, Nasai, and Ibn Hibban, and Ahmad and Abu Hatim considered him acceptable. Tirmidhi did declare him daif in 3/610, no. 1332, but graded the hadith sahih through another route immediately afterward.The hadith itself is sahih. Hakim graded it sahih in 4/93 and 94, and Dhahabi agreed with him in both places. It is found in Abu Dawud, 3/356, no. 2948. Munziri attributed it, in 3/177, to those we have mentioned, and noted Hakim's grading of it as sahih.