Q 2: The Messenger of Allah (peace be upon him) said in a Hadith what means that those whose Salah (Prayer) does not restrain them are not one of us, and the Messenger of Allah (peace be upon him) is the most truthful. In another narration, some of the Sahabah (Companions of the Prophet) told the Messenger of Allah (peace be upon him), "So-and-so offers Salah but commits immoral acts.” He (peace be upon him) said, "His Salah will come one day and restrain him."In the first Hadith, he (peace be upon him) said that those whose Salah does not restrain them are not one of us; and in the second narration, he (peace be upon him) said that the Salah of someone committing immoral acts will prevent them from their wrongdoing.
Should a person who commits immoral acts offer Salah or not?
The first narration is not a Hadith related from the Messenger of Allah (peace be upon him), as far as we know. Allah (Exalted be He) says:
...and perform As-Salât (Iqamât-as-Salât). Verily, As-Salât (the prayer) prevents from Al-Fahshâ’ (i.e. great sins of every kind, unlawful sexual intercourse) and Al-Munkar (i.e. disbelief, polytheism, and every kind of evil wicked deed)
Thus, if someone performs Salah in the way ordained by Shari`ah (Islamic law), their Salah will restrain them from committing immoral and evil acts. It was reported that when the Prophet (peace be upon him) was informed about someone who used to offer Qiyam Al-Layl (standing for optional Prayer at night) and steal by day, he (peace be upon him) said:
If he is honest, what you say (his Salah) will restrain him.
If a person does not offer Salah in the correct way that is ordained by Shari`ah, it will not restrain them from committing immoral and evil acts, due to what is deficient in it.May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.