• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 How can I remove votes on polls made by members that are now banned?

Donny

Active member
#1
I had a load of users register to my forum just to vote on a poll to screw the results.

I've now erased the users as spam (assuming it would remove their votes, but it doesn't!!!!).

So now I have users that have voted, and are now banned, still having their votes counted in a poll.

Is there a way to remove votes from users that are banned somehow? Perhaps using a SQL command or something?

I do know the specific thread, as it's just one poll for now, so can use the thread ID maybe in the SQL command? And I also have a list of the users, so can perhaps get all their user ID's if that helps with the command?

I just don't know how to form a command that'd do it.

Please help.
 

Donny

Active member
#2
Okay so I thought I could delete the banned members, and run a rebuild of the polls counter, but the votes stay. And now the votes are made by what is displayed as (Deleted Member) as in this thread: https://xenforo.com/community/threa...nt-but-voted-on-poll-resulting-in-404s.71929/

So I think I now could have screwed my chances of using their user ID in a SQL command.

I think I've found an issue with XF here. While it's not a bug or something, surely this shouldn't be the case with the software?

@Kier ?

@Brogan can you suggest anything mate? You have helped me with loads of issues before now with your forum wizardry.
 

Donny

Active member
#3
@Chris D @Mike

Can you guys help at all?

Seems I've possibly found a bit of a development issue?

I've removed the users as spam and it didn't remove their votes. Perhaps that should be a stock XF feature?
 

Chris D

XenForo developer
Staff member
#4
The result of everything you have done, at this point, is expected and behaving the appropriate way.

We don't consider votes in polls as spam, and although you can suggest it become a feature (in the XenForo Suggestions forum) personally I don't feel it makes a lot of sense to deal with this in the same way as spam.

The correct solution in your case, though it won't be retroactive, is to consider removing the "Vote on polls" permission from your "Registered" user group, and then to use a user group promotion that automatically promotes (using whichever criteria you feel is appropriate) users to an additional user group that grants the "Vote on polls" permission.

For example, you might consider that users who have made more than 5 posts are valid and contributing members who are deserving of the right to vote on a poll, and therefore you will use that criteria to allow these users to vote, while users who are only registering to vote won't be able to.

In terms of moving forward with the current issue, there's not a lot I can recommend. You likely have to just accept that the polls contain some invalid votes, or delete the polls and run them again after adding the new permissions.
 

Donny

Active member
#5
Thanks for the reply Chris.
I'd already created the promotion to allow voting earlier today. So it'll prevent false votes in the future at least.

I'll erase the poll and leave it for now.