Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
667 views
in Q2A Core by
I believe that at least part of the answer is to look at the table ^userevents and the related php file qa-include/app/updates.php. Should I take a look at any other table? So, if an user does not arise in this table ^userevents it means that it has not asked a question, answered a question or made a comment (?). And if it it arises it is because the user has generated content to the site or the user may arise in this table due to another reason?
Q2A version: 1.7

1 Answer

+2 votes
by
selected by
 
Best answer

I wouldn't take a look at the ^userevents table. That's related to how the updates for the logged in user are managed and is a bit complicated to my taste.

The answer to your question is actually: what do you mean by content? For example, it is clear that asking a question generates content but what about sending a private message? Or why not upvoting? Or flagging? Or even logging in that records a login date?

There is no table that contains all that but it is distributed between several of them. The most likely place that seems to satisfy your needs seems to be the ^userpoints table. There you will have the questions, comments and answers for each user and how many of them they are, along with other point changing values like selecting an answer or getting an answer selected, or upvotes given or received.

by
Thank you! However, as I understand, an user may have already answered or asked a question without receiving any points. The problem that I have actually is that I was careless in the past and my qa site was populated by about 50k bots. I want to remove them. However, there is no easy solution but it seems that the solution that is the closest to the one that I am looking for is (1)  to remove all the users that have not confirmed email; (2) to remove other users that come for a list suspect domain sites that do not have generated questions, comments and answers in the site; (3) to test the reminder ones using botscout for instance. It is worth mentioning that the anti-bots systems are great to avoid bots, such as the one that you have created (thank you), since the 10% that it is not able to detect we can remove manually. However, in my case, 10% of 50k is still are very large number and I am looking for a mix of solutions and strategies.
by
Furthermore, at least in my qa web site, the bots usually do not generate content and few of them that do that (with advertisement questions)  were removed in the past.
by
+1
I thought it was related to that. I often do a similar thing.

The userpoints table keeps track of points and everything the core considers could have an impact in points. However, whether they change points or not, makes no difference. They are still tracked. So the table is a good source of information.

Some random comments:
 * Don't forget to check user level. You don't want to remove an admin just because they haven't created content
 * Be careful with those services because IP addresses are quite dynamic so if there is a match for an IP address for an account created a year ago the match might not be really relevant
by
+1
Yes! Those random points are really relevant. In particular, IP addresses (I just discovered that) are crazy. It is difficult to track them.
...