Hadithcore
Musnad Ahmad, 263
sahih· Darussalam

It was narrated from ‘Umar that:

He went to the Prophet (ﷺ) and said: Sometimes I become junub. He told him to wash his private parts and do wudoo’ as for prayer (i.e., then go to sleep, and do ghusl before Fajr).

حَدَّثَنَا أَبُو أَحْمَدَ، مُحَمَّدُ بْنُ عَبْدِ اللَّهِ حَدَّثَنَا سُفْيَانُ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، عَنْ عُمَرَ، رَضِيَ اللَّهُ عَنْهُ أَنَّهُ أَتَى النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَ إِنَّهُ تُصِيبُنِي الْجَنَابَةُ فَأَمَرَهُ أَنْ يَغْسِلَ ذَكَرَهُ وَيَتَوَضَّأَ وُضُوءَهُ لِلصَّلَاةِ‏.‏

References1 variant
In-Book Reference
Book 2, Hadith 177