Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author mcwebdesignro

    (@mcwebdesignro)

    I’ll add this feature in the next update.

    The brute force way to make the change is to go down to line 145 which looks like this

    //find users with no posts & count published posts
    
                    $query = "SELECT COUNT(WP.ID) as recs, WU.ID
    				FROM {$tp}users WU
    LEFT JOIN {$tp}posts WP ON WP.post_author = WU.ID AND NOT WP.post_type in ('attachment', 'revision') AND post_status = 'publish'
                                    GROUP BY WU.ID";

    and change it to this

    //find users with no posts & count published posts

    $query = "SELECT
    COUNT(WP.ID) AS recs, COUNT(WC.comment_ID) AS comments, WU.ID
    FROM {$tp}users WU
    LEFT JOIN {$tp}posts WP ON WP.post_author = WU.ID AND NOT WP.post_type IN ('attachment', 'revision') AND post_status = 'publish'
    LEFT JOIN {$tp}comments WC ON WC.user_id = WU.ID AND WC.comment_approved = 1
    GROUP BY WU.ID
            HAVING recs = 0 AND comments = 0";

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Users with no posts OR no comments?’ is closed to new replies.