Limit ratings input

Hi,
I’ve managed to solve that people can give an input rating to content in my database. This given total average rating is also shown for the chosen content(average rating + number of ratings). However I need to somehow manage to make sure that one person can only give 1 rating per content, now one can just spam rating on the same content to mess with the ratings.
Does onyone have a smart way to block this? Save ratings given by ip-adress / use cookies maybe?

Thanks in advance

IPAddresses and Cookies will not stop the problem as these change or can be deleted. You need an alternate model using something that you can rate limit with such as an email address or authentication using a ‘trusted’ service like Google or Facebook. If you restrict comments or rating to site members you have a better chance to manage this and can block users who are spamming using their membership email.

There is a way to accomplish this in code without needing the user to log into the site. You can use the wix-users register() function to add an email to the site membership list then use it, via the Members/PrivateMemberCollection without the need for login. Then you can create an anti spamming capability based on patterns you see occurring. With a ‘pending’ membership registration you can use the blockByEmail function which is used to prevent future log in. This also sets the status in the Members/PrivateMemberCollection to BLOCKED. With this you can query the collection for the email address (which you will require on each rating) and block if status is blocked.

If you don’t want to get the email each time then simply require the user to be a site member and be logged in to apply ratings. This will make blocking even easier!