Skip to:
Content
Pages
Categories
Search
Top
Bottom

Export users that posted to bbpress


  • devpaq
    Participant

    @devpaq

    Is there a way I can export all users (ie email addresses) that have posted to bbpress?

    I am trying to put a list together, but I have so many users in wordpress that are not active in bbpress (either they signed up to comment on my regular wordpress comments, or they were spam registrations).

    I would like to only get users that actually posted to anything in bbpress.

    (I am fine with doing it via phpmyadmin if someone can direct me)

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • In your wp_posts, check for all post_type = ‘topic’ and get the post_author. Then find the post_author (which is the ID) in the wp_users column and check for the user_email field.

    When you have the list, do the same for post_type = ‘reply’

    So just out of my head that would be:
    SELECT DISTINCT user_email FROM wp_users,wp_posts WHERE ((wp_posts.post_author = wp_users.ID) and (wp_posts.post_type = ‘reply’))
    SELECT DISTINCT user_email FROM wp_users,wp_posts WHERE ((wp_posts.post_author = wp_users.ID) and (wp_posts.post_type = ‘topic’))


    devpaq
    Participant

    @devpaq

    This worked perfectly, Thanks!
    The only thing I added was AND wp_posts.post_status = 'publish' so that it didn’t export those that were spam posts.

    Happy to hear it worked !
    Pascal.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar