Hadithcore
Sahih al-Bukhari, 143
sahih

Narrated Ibn `Abbas:

Once the Prophet (ﷺ) entered a lavatory and I placed water for his ablution. He asked, "Who placed it?" He was informed accordingly and so he said, "O Allah! Make him (Ibn `Abbas) a learned scholar in religion (Islam).

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ مُحَمَّدٍ، قَالَ حَدَّثَنَا هَاشِمُ بْنُ الْقَاسِمِ، قَالَ حَدَّثَنَا وَرْقَاءُ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي يَزِيدَ، عَنِ ابْنِ عَبَّاسٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم دَخَلَ الْخَلاَءَ، فَوَضَعْتُ لَهُ وَضُوءًا قَالَ ‏"‏ مَنْ وَضَعَ هَذَا ‏"‏‏.‏ فَأُخْبِرَ فَقَالَ ‏"‏ اللَّهُمَّ فَقِّهْهُ فِي الدِّينِ ‏"‏‏.‏

References2 variants
In-Book Reference
Book 4, Hadith 9
USC-MSA web (English) reference
Vol. 1, Book 4, Hadith 145 (deprecated numbering scheme)
Sharh · explanationclick to expand
This hadith highlights the virtues of Ibn ‘Abbas (may Allah be pleased with him). In it, he tells us that he brought water to the Prophet (blessings and peace of Allah be upon him) so that he could do wudu’. After he came out of the outhouse – which is a word used to describe any place where people relieve themselves, by urinating or defecating – he asked who had put the water there for him, and he was told that it was Ibn ‘Abbas (may Allah be pleased with him). The one who told him that was the maternal aunt of Ibn ‘Abbas, Maymunah (may Allah be pleased with her), because that happened in her house, as is mentioned in the report of Ahmad. The apparent meaning suggests that the Prophet (blessings and peace of Allah be upon him) did not ask for water; rather Ibn ‘Abbas (may Allah be pleased with him) took the initiative and hastened to bring the water, because he was a smart and intelligent boy and he used to follow the Messenger of Allah (blessings and peace of Allah be upon him). Hence the Prophet (blessings and peace of Allah be upon him) prayed for him and said: “O Allah, grant him understanding of religion,” that is, bless him with understanding and deep insight into matters of religion. This prayer for him to be granted understanding of religion was appropriate, because he had done the right thing, which was indicative of his intelligence. This also indicates that the Prophet (blessings and peace of Allah be upon him) was happy that he took the initiative of bringing water for him when he went to the outhouse. The blessing of this supplication was demonstrated in ‘Abdullah (may Allah be pleased with him), as his knowledge and virtue became well-known, and he was one of the Sahabah who narrated a great deal from the Prophet (blessings and peace of Allah be upon him). He narrated approximately one thousand six hundred and sixty hadiths, and ‘Umar (may Allah be pleased with him) consulted him about major issues. This hadith indicates that one may reward a person by offering supplication for him when he does a favour, offers help or does an act of kindness. It also indicates that it is prescribed to serve scholars and people of knowledge, and pay attention to their needs, without being instructed to do so..