Zayd bin Thabit came out from Marwan's place at midday. I said, "Allah has sent him to Marwan at this hour only because of some matter being asked about." So I questioned him.He said, "He asked us about things we had heard from the Messenger of Allah ﷺ. I heard the Messenger of Allah ﷺ say, 'Whoever has the world as his main concern, Allah will scatter his affairs, place poverty before his eyes, and nothing will come to him of the world except what has been decreed for him. But whoever has the Hereafter as his intention, Allah will gather his affairs for him, place contentment in his heart, and the world will come to him in spite of itself.'"
خرج زيد بن ثابت من عند مروان بنصف النهار، قلت: ما بعث الله إليه هذه الساعة إلا لشيء يسأل عنه، فسألته، فقال: سألنا عن أشياء سمعناها من رسول الله ﷺ، سمعت رسول الله ﷺ، يقول: من كانت الدنيا همه، فرق الله عليه أمره، وجعل فقره بين عينيه، ولم يأته من الدنيا إلا ما كتب له، ومن كانت الآخرة نيته، جمع الله له أمره، وجعل غناه في قلبه، وأتته الدنيا وهي راغمة.
Ibn Majah (4105) and Ahmad (21590) narrated it through the route of Shubah, from Umar bin Sulayman, a descendant of Umar bin Khattab, from Abdul-Rahman bin Aban bin Uthman, from his father, who related it. The wording given is that of Ibn Majah, while Ahmad's version is longer. Its chain of transmission is sahih, and Busiri also graded it sahih. Umar bin Sulayman is Ibn Asim bin Umar bin Khattab, a trustworthy narrator, deemed trustworthy by Ibn Main, Nasai, and others.