Abu Kabsha reported,

He heard the Messenger of Allah ﷺ say, "There are three things I swear to, and I will tell you something, so memorize it."He said, "No servant's wealth has ever decreased due to charity, nor has any servant endured a wrong with patience without Allah increasing him in honor, nor has any servant opened a door of begging without Allah opening upon him a door of poverty," or words to that effect."And I will tell you something, so memorize it." He said, "The world is only for four kinds of people. A servant whom Allah has provided with wealth and knowledge, so he fears his Lord regarding it, maintains his ties of kinship through it, and recognizes Allah's right in it. This person occupies the most excellent station.A servant whom Allah has provided with knowledge but not with wealth, who is sincere in his intention, saying, 'If I had wealth, I would do as so-and-so does.' He is rewarded according to his intention, so the reward of both is equal.A servant whom Allah has provided with wealth but not with knowledge, who squanders his wealth without knowledge, neither fearing his Lord regarding it, nor maintaining his ties of kinship through it, nor recognizing Allah's right in it. This person occupies the worst station.And a servant whom Allah has provided with neither wealth nor knowledge, who says, 'If I had wealth, I would do as so-and-so does.' He is judged by his intention, so the burden of sin upon both is equal."

Tirmidhi 2325

Sahih

حدثنا محمد بن إسمعيل حدثنا أبو نعيم حدثنا عبادة بن مسلم حدثنا يونس بن خباب عن سعيد الطائي أبي البختري أنه قال

حدثني أبو كبشة الأنماري

أنه سمع رسول الله ﷺ يقول ثلاثة أقسم عليهن وأحدثكم حديثا فاحفظوه قال ما نقص مال عبد من صدقة ولا ظلم عبد مظلمة فصبر عليها إلا زاده الله عزا ولا فتح عبد باب مسألة إلا فتح الله عليه باب فقر أو كلمة نحوها وأحدثكم حديثا فاحفظوه قال إنما الدنيا لأربعة نفر عبد رزقه الله مالا وعلما فهو يتقي فيه ربه ويصل فيه رحمه ويعلم لله فيه حقا فهذا بأفضل المنازل وعبد رزقه الله علما ولم يرزقه مالا فهو صادق النية يقول لو أن لي مالا لعملت بعمل فلان فهو بنيته فأجرهما سواء وعبد رزقه الله مالا ولم يرزقه علما فهو يخبط في ماله بغير علم لا يتقي فيه ربه ولا يصل فيه رحمه ولا يعلم لله فيه حقا فهذا بأخبث المنازل وعبد لم يرزقه الله مالا ولا علما فهو يقول لو أن لي مالا لعملت فيه بعمل فلان فهو بنيته فوزرهما سواء

الترمذي 2325صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Asceticism
Chapter
As a parable of this world being like four people
Numbering
Darussalam 2325
Tirmidhi 2325