Abu Kabshah Al-Anmari narrated that the Messenger of Allah (s.a.w) said:
There are three things for which I swear and narrate to you about, so remember it. He said: The wealth of a slave (of Allah) shall not be decreased by charity, no slave (of Allah) suffers injustice and is patient with it except that Allah adds to his honor; no slave (of Allah) opens up a door to begging except that Allah opens a door for him to poverty - or a statement similar- And I shall narrate to you a narration, so remember it. He said: The world is only for four persons: A slave whom Allah provides with wealth and knowledge, so he has Taqwa of his Lord with it, nurtures the ties of kinship with it, and he knows that Allah has a right in it. So this is the most virtuous rank. And a slave whom Allah provides with knowledge, but He does not provide with wealth. So he has a truthful intent, saying: 'If I had wealth, then I would do the deeds of so-and-so with it.' He has his intention, so their rewards are the same. And a slave whom Allah provides with wealth, but He does not provide him with knowledge. [So he] spends his wealth rashly without knowledge, nor having Taqwa of his Lord, nor nurturing the ties of kinship, and he does not know that Allah has a right in it. So this is the most despicable rank. And a slave whom Allah does not provide with wealth nor knowledge, so he says: 'If I had wealth, then I would do the deeds of so-and-so with it.' He has his intention, so their sin is the same.