• Hi! I am looking for a way to update user’s status to Inactive with php. I found the wp_update_user() -function but I can’t figure out how to use it to change user inactive.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    WP by default does not have any statuses for users. Any status functionality would have been introduced by a theme or plugin. The way to alter status would depend on how status is managed. Is it a role? Capability? User meta data? Actually, those are all different variants of user meta. You might be able to discover how it’s manged by viewing all user meta for a particular user through the phpMyAdmin app.

    If you can learn what data manages status, then you’d be able to alter it. If you have difficulty discovering this on your own, I recommend asking for guidance through whichever module is responsible for implementing status management.

Viewing 1 replies (of 1 total)
  • The topic ‘Updating user status programmatically’ is closed to new replies.