Look up votes in DB rather than user's session
colan - February 6, 2008 - 07:19
| Project: | Smackdown |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Currently, Smackdown stores user votes with each user's session data. This isn't terribly reliable. A more reliable way to determine which smackdowns a user has already voted on is to check the user's votes in the DB.
I've got a patch here that makes the necessary change, but it assumes that only logged-in users can vote. All that has to be added to account for anonymous users is a check for the uid before the DB call to the votingapi_vote table. If it's zero, then search the hostname field for the user's IP address instead of searching for the user's uid.
| Attachment | Size |
|---|---|
| db.patch | 3.2 KB |

#1
5.x unsupported. please try 6.x