The Messenger of Allah ﷺ said, "Whoever Allah wishes good for, He grants him understanding of the religion."
قال رسول الله ﷺ: من يرد الله به خيرا يفقهه في الدين.
Ibn Majah (220) narrated it from Bakr bin Khalaf, who said, Abdul-Ala narrated to us, from Mamar, from Zuhri, from Saeed bin Musayab, from Abu Hurairah, and he related the hadith. This chain is hasan because of Bakr bin Khalaf, for he is truthful, and it is also found in Musnad Imam Ahmad (7194) from Abdul-Ala with his chain, with the addition, "I am only a distributor, and it is Allah who gives ."On this topic there are narrations from a number of companions, among them the hadith of Umar bin Khattab, from the Prophet ﷺ, who said, "Whoever Allah wishes good for, He grants him understanding." Tahawi narrated it in Mushkil (1692), Ibn Abdul-Barr in Jami Bayan Ilm wa Fadlihi (81), and Khatib in Faqih wa Mutafaqqih (5), all of them through the hadith of Amr bin Harith, that Abbad bin Salim narrated to him, that Salim bin Abdullah narrated to him, from Abdullah bin Umar, from Umar bin Khattab, who related it.In it is Abbad bin Salim, whom Bukhari mentioned in Tarikh, and Ibn Abu Hatim in Jarh wa Tadil, but neither of them said anything about him, so he is counted among the unknown narrators. As for Ibn Hibban, he mentioned him in his Thiqat, following his usual practice of affirming the reliability of unknown narrators.