I'm using FiveStars module and I'm modifying the code. I need to get the last vote of a user for a specific node.
I'm sure that the module stores it, because it displays the stars the user previously selected, when he logs in and re-visits the node.
But I'm not able to find this in the code. (I only found the average vote for a node, and the count of nodes).
Take a look at fivestar_get_votes()
in fivestar.module. To get the votes for, say, user 1 on node 34, you'd do fivestar_get_votes('node', 34, 'vote', 1)
. Alternatively, take a look at the Voting API, which fivestar_get_votes()
uses.