How do I cancel (remove) all likes of a particular user?


(Anton) #1

Is there a way to cancel all likes of a particular user? I have a user that liked topics / messages of the same user 365 times , and zero times for other persons. This is a fake user for fake likes to help win in a contest :slight_smile:


(cpradio) #2

Does the user have any posts? You might be able to just delete the user. Not sure if that removes the likes though…


(Anton) #3

Deleting a user seems more offensive :slight_smile: I’d like not to delete their account. But removing all of their likes just before counting likes and determine the winner - should work smoothly.


(Anton) #4

I could probably remove likes manually by running a database query. But what about topic statistics - will it update automatically…?


(cpradio) #5

Can you simply look up his account before tallying up the results and subtract his likes from the person he was liking in the contest? (instead of removing the likes altogether)


(Anton) #6

This wouldn’t be the best option as people are looking at the likes counters and think those are the true ones. What’s more, there is another ongoing contest where the most popular topic in a month is a winner, and the topic popularity depends on the likes as well.

So, the question is, will all the figures everywhere recalculate automatically after removing the likes manually from the database?


(Anton) #7

Discourse developer, please help: how do I remove likes correctly so that any statistics and ratings are recalculated?

Also, when I remove a message with likes, will the counter update for the total likes received of a user?