It is allowing anonymous users to vote, and adjusting the average vote accordingly, but it is not counting the vote into the number of votes field.

Comments

hickory’s picture

It shouldn't be allowing anonymous users to vote. Did you change something in the module?

marcingy’s picture

I work with the person who raised this issue. There is an option within the admin screens to Display rating form for anonymous users. When this is set to yes it allows anonymous votes to be submitted. Nothing has been changed in the module.

hickory’s picture

It shouldn't allow votes to be submitted for anonymous users.

hickory’s picture

What should happen: when an anonymous user submits a rating they get a message saying "unauthorised: please login or register", which then leads them back to the node to vote when they've logged in.

marcingy’s picture

The only issue with this is that under access control you can set the anonymous user as being allowed to rate content then the test in jrating_form_submit for user access will be passed.

line 221
if (user_access('rate content')){
}

Maybe a test should also be made here to ensure that $user->uid != 0. Otherwise any attempt to submit a vote for an anonyomus user will be successful if the permission has been enabled and the rating form is displayed.

hickory’s picture

Assigned: Unassigned » hickory

Good point - I'll fix that.

hickory’s picture

Status: Active » Fixed

Should be fixed now in CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)