Sayyiduna Muhajir bin Qunfudh (may Allah be pleased with him) narrates: He came to the service of the Prophet Muhammad (peace and blessings be upon him). The Prophet (peace and blessings be upon him) was performing ablution at that time. He greeted the Prophet (peace and blessings be upon him) with salam, but the Prophet (peace and blessings be upon him) did not reply to his salam. When he completed his ablution, he (replied to the salam and) explained with an excuse, saying: "I did not like to mention Allah Almighty while I was in a state of impurity." (There is doubt about one word here according to the narrator.) Hasan al-Basri used to give fatwa according to this narration.
(Imam Ibn Hibban, may Allah have mercy on him, says:) The words of the Prophet (peace and blessings be upon him), "I disliked mentioning Allah Almighty while I was in a state of impurity," mean (the intention of attaining) virtue, because remembering Allah in a state of ablution is more virtuous. It is not that the Prophet (peace and blessings be upon him) disliked it because it is unlawful.
Hadith Referenceصحیح ابن حبان / كتاب الرقائق / 803
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الصحيحة» (834)، «صحيح أبي داود» (13).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم، رجاله ثقات رجال الشيخين غير الحضين، فمى رجال مسلم، وعبد الأعلى- وهو ابن عبد الأعلى البصري السامي- قد سمع من سعيد قبل اختلاطه، والحسن هو البصري، وانما تضر عنعنتة ويعل الحديث بها إذا روى عن الصحابة، أما عن التابعين، فلا تضر، وقد علمت ذلك بالتتبع، وسعيد هو ابن أبي عروبة.