Hadith Q228
وَالدَّلِيلُ عَلَى ضِدِّ قَوْلِ مَنْ زَعَمَ أَنَّ الْجُنُبَ إِذَا دَخَلَ نَهْرًا نَاوِيًا لِلسِّبَاحَةِ فَمَاسَّ الْمَاءُ جَمِيعَ بَدَنِهِ، وَلَمْ يَنْوِ غُسْلًا وَلَا أَرَادَهُ إِذَا فُرِضَ الْغُسْلُ، وَلَا تَقَرُّبًا إِلَى اللَّهِ- عَزَّ وَجَلَّ- أَوْ صُبَّ عَلَيْهِ مَاءٌ وَهُوَ مُكْرَهٌ، فَمَاسَّ الْمَاءُ جَمِيعَ جَسَدِهِ أَنَّ فَرْضَ الْغُسْلِ سَاقِطٌ عَنْهُ.
And the explanation of the evidence contrary to the claim of those scholars who say that if a person in a state of major ritual impurity (junub) enters a river without the intention of bathing, and water touches his entire body, even though after the obligation of ghusl (ritual bath) he neither intended nor resolved to perform ghusl, nor was his purpose to seek closeness to Allah Almighty, or water was poured over him by force which he disliked and which touched his entire body, then the obligation of ghusl is lifted from him.
Hadith 228
قَالَ أَبُو بَكْرٍ: قَدْ أَمْلَيْتُ خَبَرَ عُمَرَ بْنِ الْخَطَّابِ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: " الْأَعْمَالُ بِالنِّيَّةِ , وَإِنَّمَا لِامْرِئٍ مَا نَوَى.
Imam Abu Bakr, may Allah have mercy on him, says that I have narrated from Sayyiduna Umar bin Khattab, may Allah be pleased with him, from the Prophet Muhammad, peace and blessings be upon him, that he said: "Actions are based on intentions, and for every person is what he intended."