Skip to content
Advertisement

Prevent new WordPress users from logging in until manually “activated”?

I’m developing a plugin for WordPress which has 3 groups of users. I need to disable some users and prevent them from login. what I mean isn’t preventing them to access the backend. I want to prevent them from is log in. For example, when they want to login they should see a message like this account isn’t active yet. thank you guys.

Advertisement

Answer

after some search and see similar problems I solved this problam like this : first add a user meta for user status so we can checking if user is active or not then we can disable or enable users.

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement