I've a community where the users are given points everytime they login to the site. Is it possible to make it so they can only get those points once a day to prevent users loggin in and out to gain extra points?

CommentFileSizeAuthor
#5 once_a_day_limit-2604146-1.patch1.43 KBjagadeeshramuj

Comments

nipe75’s picture

Did you find the answer to this question. I will also be interested.

marcoka’s picture

using cron as trigger would solve this, because you say when it is run.

YK85’s picture

Category: support » feature

+1 subscribing

marcoka’s picture

just use a simple mysql per cron

like

UPDATE TABLE userpoints SET points = 15000 WHERE uid > 1
SELECT userpoints.points FROM userpoints, users_roles WHERE userpoints.uid = users_roles.uid AND users_roles.rid = 4
UPDATE userpoints, users_roles SET userpoints.points = 15000 WHERE userpoints.uid = users_roles.uid AND users_roles.rid = 4
jagadeeshramuj’s picture

Issue summary: View changes
StatusFileSize
new1.43 KB

Kindly find below reference patch for user points validating day limit for drupal 7.
https://www.drupal.org/node/2604146#comment-10508758

manuel.adan’s picture

Status: Active » Closed (outdated)

Closing this as outdated, 6.x version is no longer maintained. Anyway, in 8.x, something to support in the transaction module by a event or hook on transaction execution validation (pre-execute).