Sunan Ibn Majah · Hadith 225
The Book of the Sunnah - كتاب المقدمة
حدثنا بكر بن خلف أبو بشر، حدثنا عبد الأعلى، عن معمر، عن الزهري، عن سعيد بن المسيب، عن أبي هريرة، قال قال رسول الله صلى الله عليه وسلم " من يرد الله به خيرا يفقهه في الدين " .
It was narrated that Abu Hurairah said: "The Messenger of Allah said: 'When Allah wills good for a person, He causes him to understand the religion.'"
Gradings are classical jarḥ-wa-taʿdīl, name-matched to a rijāl index (not individually re-verified).