I want to make option to approve users before they can login or to ban them. can anyone provide me the code
I did not downvote you. I think you need to read https://www.daniweb.com/programming/threads/435023/read-this-before-posting-a-question first then try again. If you are wanting to hire programmers there's a way to do that as well.
Here, it's more about you applying yourself and members able to read what you tried and comment why it worked or not.