I used to spend nights in the mosque and by that time I had no wife and children. I saw in a dream as if I am being taken to a well. I made a mention of it to Messenger of Allah (may peacebe upon him). The rest of the hadith is the same.
كُنْتُ أَبِيتُ فِي الْمَسْجِدِ وَلَمْ يَكُنْ لِي أَهْلٌ فَرَأَيْتُ فِي الْمَنَامِ كَأَنَّمَا انْطُلِقَ بِي إِلَى بِئْرٍ فَذَكَرَ عَنِ النَّبِيِّ ﷺ بِمَعْنَى حَدِيثِ الزُّهْرِيِّ عَنْ سَالِمٍ عَنْ أَبِيهِ