I have created a patch to use the new api in userpoints 3x.

CommentFileSizeAuthor
userpoints_invite.020708.patch3.49 KBebeyrent

Comments

icecreamyou’s picture

Title: Integrate with 3x version of Userpoints » Integrate Invite with 3x version of Userpoints

Hooray! Will test tonight.

kbahey’s picture

ebeyrent, is this patch tested?

IceCreamYou, please confirm if it works for you, I will then commit it.

icecreamyou’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that it works on Drupal 5.5, PHP 5.2.5, MySQL 5.0.45, on an Apache/2 webserver, for the most part.

Points are awarded appropriately on invites and registry, as well as withdrawn invitations. However, points are not detracted when a user account is deleted (as they're supposed to be if a certain setting is enabled). This means that if users are allowed to delete their accounts, they could keep inviting and then deleting a second account, racking up the points as they did so.

It's not a major problem though. Most sites don't allow users to delete their accounts, and I'm not even sure the original module worked for this either.

In my opinion, this can be committed. I didn't test it extensively and I only tested it on my one site, but the code looks accurate to me. The change is minor--really, just a single command was changed to use the 3.x API.

Thanks to both Userpoints maintainers and ebeyrent.

(I'm running the latest stable version of Userpoints (3.3 I think) and the latest version of Userpoints Contrib.)

kbahey’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch, and thanks for testing.

This is now in CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.