قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " لا يَسْرِقُ سَارِقٌ وَهُوَ حِينَ يَسْرِقُ مُؤْمِنٌ، وَلا يَزْنِي زَانٍ وَهُوَ حِينَ يَزْنِي مُؤْمِنٌ، وَلا يَشْرَبُ الْحُدُودَ أَحَدُكُمْ يَعْنِي الْخَمْرَ وَهُوَ حِينَ يَشْرَبُهَا مُؤْمِنٌ، وَالَّذِي نَفْسُ مُحَمَّدٍ بِيَدِهِ لا يَنْتَهِبُ أَحَدُكُمْ نُهْبَةً ذَاتَ شَرَفٍ يَرْفَعُ إِلَيْهِ الْمُؤْمِنُونَ أَعْيُنَهُمْ فِيهَا وَهُوَ حِينَ يَنْتَهِبُهَا مُؤْمِنٌ وَلا يَغُلُّ أَحَدُكُمْ حِينَ يَغُلُّ وَهُوَ مُؤْمِنٌ وَإِيَّاكُمْ وَإِيَّاكُمْ "
And the Messenger of Allah, peace and blessings be upon him, said: "A thief is not a believer at the time of stealing, an adulterer is not a believer at the time of committing adultery, and a drunkard is not a believer at the time of drinking alcohol. By the One in whose hand is the life of Muhammad, peace and blessings be upon him! If any honorable person among you commits robbery, to whom the believers look up, then at the time of that robbery, he is not a believer. And the one who betrays trust is not a believer at the time of committing betrayal. So you must abstain from these (evil and despicable habits)! Beware."
Related hadith on this topic