Helping you Build Your Own Social Network!

Faster, better and easier!

Request: Hide from member's list

(2 posts) (2 voices)
  • Started 2 years ago by Symm2112
  • Latest reply from Brajesh Singh

Tags:

No tags yet.


  1. Brajesh,

    My community has been down for almost a year now and while I had around 1100 members, I only have around 500 comments. I want to "reset" my users and members list for the new BP launch. This is a two part question.

    1. Is there any type of mysql query that I can use to remove any users from the wp-users table that do not have any comments associated with them? I don't just want to remove everyone because anyone who used to be active I still want them to have their account and I don't want to lose the owner of the comments.

    2. I found an "undocumented" trick to hiding someone from the members list by setting in the wp-users table their status to "99" instead of the default. I'm curious if you know about this trick and if there's something wrong with this method and if so, is there a way that a plugin could be written to set a "hide from members list" toggle in the adminbar so that just like your stealth mode plugin, I could allow them to "Opt in" to rejoin my community since it's been down for so long? I'm trying to avoid just setting everyone to "99" and then saying "email me to unhide yourself."

    Thanks for the suggestions.

    Posted 2 years ago #
  2. hi Chris
    For your first problem

    we will need to delete users from user table and from the the user meta table

    here are the queries for single user wp

    delete from wp_users where ID not in (select user_id from wp_comments)

    2nd query to drop user data from usermeta table

    delete from wp_usermeta where user_id not in (select wp_comments.user_id from wp_comments)

    This will delete all the registered users who have not left any comment.

    For second, let me take a look at the feasibility will be posting back.

    Please do not try the swql on live installation, rather take a backup and then try.

    Posted 2 years ago #

Reply

You must log in to post.