Hello,

I've been having a lot of trouble developing a custom patch to this module and I got in trouble because when it runs, it won't clear the userpoints table before re-running the INSERT's at userpoints_retroactive_initalize(), thus leaving the table with duplicate entries, for each pre-existing uid.

The solution, is to do as userpoints_reset does and run db_query('DELETE FROM {userpoints}'); at the beginning of the userpoints_retroactive_initalize() function. This will wipe out any pre-existing entires, thus leaving only the new empty ones.

Bye.

Comments

kbahey’s picture

Status: Needs review » Closed (works as designed)

There is another module that does that called userpoints_reset.

Use it then use retroactive.