Advertisement
pligg

MySQL Pligg Check for Active Members

Jun 23rd, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.57 KB | None | 0 0
  1. Select * FROM pligg_users
  2. WHERE pligg_users.user_lastlogin NOT LIKE '0000-00-00 00:00:00' /* Make sure that the user has logged in once */
  3. AND pligg_users.user_level != 'Spammer' /* Make sure that the user isn't a known spammer */
  4. AND (
  5.     /* Here we check if the user has submitted a story, comment, or vote */
  6.     pligg_users.user_id
  7.     IN (
  8.         SELECT link_author
  9.         FROM pligg_links
  10.     )
  11.     OR pligg_users.user_id
  12.     IN (
  13.         SELECT comment_user_id
  14.         FROM pligg_comments
  15.     )
  16.     OR pligg_users.user_id
  17.     IN (
  18.         SELECT vote_user_id
  19.         FROM pligg_votes
  20.     )
  21. )
  22. ORDER BY pligg_users.user_id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement