Hi there. Using an older version of Userpoints until the broken connection with Ecommerce in 5.x gets fixed (depends on degraded Ecommerce module Payment, does not communicate with replacement module Receipt).

My question is whether it's possible to have new users start with a number of points other than zero. I'd like to give a little bonus for registering (say, 100 points or whatever) and there's no provision for this in the 'points for basic events' settings. I'm wondering if there's a quick fix by changing some variable in the Userpoints module itself, but after scanning it I'm not able to see anything obvious. Then again I'm almost completely useless with code. Perhaps someone can help?

thanks in advance...

Comments

graphicdefine’s picture

I'm wondering the same thing. If I figure it out I'll post my solution.

subtlearts’s picture

I have now implemented this functionality by borrowing and editing some code from the referral module into the login_toboggan module, along with some code from the referral_points module.

This has the added benefit of awarding points to both the new user and the referrer ONLY when the new user authenticates, rather than when the account is created. This creates a small obstacle for someone trying to scam points by creating multiple accounts: each account, in order for points to be awarded, needs a working, unique email - rather than just something that resembles one.

If anyone is interested, I can post the added code here... it's pretty straightforward, I am a long way from expert in these things but it works on my site and doesn't seem to break anything else in the process...