Hadith 2:48
‘Ali reported God’s messenger as saying, “Good is the man learned in religion who, if people have need of him benefits them, but who, if they ignore him enriches himself.”* Razin transmitted it. *i.e. with religious exercises and study.
وَعَنْ عَلِيٍّ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «نِعْمَ الرَّجُلُ الْفَقِيهُ فِي الدِّينِ إِنِ احْتِيجَ إِلَيْهِ نَفَعَ وَإِنِ اسْتُغْنِيَ عَنْهُ أَغْنَى نَفْسَهُ» . رَوَاهُ رزين
Original Reference: Mishkat al-Masabih 251