Salam alikm the question is if someone does major sins drinking,adultry doesn’t want to do the sin again repents, falls back to the sin preserves the 5Salah as best as he can. He sees the greatness in seeking knowledge, does this person have defihncy in his iman and what to do with such a person?

Ustadh AbdulAziz al-Haqqan
The first thing that he needs to do is to keep on repenting. Alhamdulillah that he preserves his five prayers, turns to Allah, and seeks knowledge. I advise him to continue and push even more in this direction. However, maybe there are things that are making him go back, such as: 1. The environment he is in 2. Certain friends, influences, or acquaintances 3. A certain lifestyle 4. His phone and social media He should delete everything and everyone that leads him to this, in fact, buy a new number, and delete all his female contacts so that he does not fall into that again. He has to take the necessary measures and block even the ways that would lead to these things, even if he wanted to. When he surrounds himself, inshallah, with people that will push him towards Allah and farther away from these things, it will become even easier and easier. I ask Allah Subhanahu wa ta'ala to protect him from all of these evils and to make him successful, and amongst the students of knowledge that fear Allah and never come close to or touch these things ever again.