• I’m looking for a code suggestion (or plugin) that will allow me to find all users who share a particular xprofile field (e.g., “Promo Code = abc123”) and then delete these users from ALL blogs in the system. Any help would be much appreciated…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Have you asked this on the BuddyPress forums? They’re (often) more equipped to answer that, since xprofile is entirely a BP thing.

    http://buddypress.org

    Thread Starter airfoil

    (@airfoil)

    Thanks – I did post over there, but got no response.

    I think my mentioning the xprofile bit was a bit of a red herring here. I’m pretty sure I can figure out how to pull a list of users by a certain xprofile field.

    What I’m mostly wondering about is how to loop through a large list of users (once found) and completely delete them from ALL blogs in a WPMU installation – but do it in a responsible way that triggers whatever needs to be triggered in WPMU when a user is deleted.

    Unfortunately, this particular installation is still on 2.9.2. They are in the process of upgrading, but rely on several custom plugins and themes that need work to get them into 3.x shape.

    That said, certain groups of users that need to be removed completely from the system belong to many blogs – typically 5 to 10 – and there is really no way in WPMU to isolate these groups and remove the users from all blogs in the system (at least not as far as I know) without out going blog-by-blog, user-by-user.

    Thanks again.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I don’t know an efficient way to loop through the users :/ Had issues with that myself once. Best would be to make a tweak to the users table so it included Promo Code along with ID, avatar, etc. I know how to do THAT, but you can’t sort by it.

    http://tech.ipstenu.org/2011/limitations-on-sortable-columns/

    and there is really no way in WPMU to isolate these groups and remove the users from all blogs in the system (at least not as far as I know) without out going blog-by-blog, user-by-user.

    Sure there is for that 🙂

    wp-admin/network/users.php 😀

    You kill them there, and they’re off the network, which is done and done.

    Thread Starter airfoil

    (@airfoil)

    Thanks – I’m very much looking forward to seeing this installation get upgraded to 3.x. However, as of now, it is still 2.9.2, and deleting the user from the Site Admin > Users panel appears to only delete them from the primary blog/site. In my testing, a user deleted from here still remains in the other blogs.

    As a result, I’ve found myself looking for what appears to be a more complicated solution…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Find users by BP xprofile and delete from all blogs’ is closed to new replies.