Fiqh-us-Sunnah Volume 1, Purification and Prayer, Fiqh 1.040B.

Section : While mentioning the name of Allah.

Al-Muhajir ibn Qunfuzh related that he greeted the Prophet, upon whom be peace, but that the latter did not return his salutation until he had made ablution: “There is nothing that prevented me from responding to you except that I do no like to mention the name of Allah unless I am in a state of purity.” Said Qatadah, “Because of this, al-Hassan hated to recite the Qur’an or mention Allah’s name unless he had performed ablution. (Related by Amad, Abu Dawud, an-Nasa’i and Ibn Majah.) Reported Abu Juhaim ibn al-Harith, “The Prophet, upon whom be peace, met a person at the well of Jaml, who greeted him, but he did not return his greeting until he had wiped his face and hands.” (Related by Ahmad, al-Bukhari, Muslim, Abu Dawud and an-Nasa’i.) This action was one of preference, not of obligation. Mentioning the name of Allah is permissible for the one who is in a state of purity, one who has a minor impurity, a person in post-sex impurity, or one who is standing, sitting, and so on. Said ‘Aishah, “The Messenger of Allah used to remember Allah at all times.” (Related by “the five,” except for an-Nasa’i.) Al-Bukhari recorded it in mu’alliq form.) Reported ‘Ali, “The Messenger of Allah would come from relieving himself, recite to us and eat meat with us. Nothing would stop him from the Qur’an except post-sex impurity.” (Related by “the five.” At-Tirmizhi and Ibn as-Sakin categorized it as sahih.)