Im not sure if user points is currently capable of doing this, but I want to run a contest to see who can accumulate a certain number of points and Im wondering is if there is some way to send an email every time a user reaches that points threshold?

If this feature isn't available, perhaps it would make a good edition?

Thanks,

sam

Comments

sbsimmons86’s picture

Anyone?

jredding’s picture

This feature isn't available but you are welcome to code it if you'd like. Take a look at the modules in userpoints_contrib to see if any of the modules get close to what you want and start from there.

i do remember a module that sends out emails but I don't think its based on thresholds (although it wouldn't be difficult to modify to do so).

kbahey’s picture

Project: User Points » User Points Contributed modules
Version: 6.x-1.0 » 6.x-1.x-dev
Component: Other » Code: userpoints_admin_email
Status: Active » Fixed

I created a new module called userpoints_admin_email.

It will be available in the -dev tarball about 10 hours from the time of this posting.

jredding’s picture

well there you go..

sbsimmons86’s picture

Perfect! I really appreciate it!

I will update in the morning.

Thanks,

Sam

sbsimmons86’s picture

I updated and got your new module working... there is only one problem, I set my threshold to 25 and I get this message:

User CactusJack (http://fishnarizona.com/anglers/cactusjack) has reached the number of points set in the threshold: 10

sbsimmons86’s picture

It appears I am getting a message every time a user earns points...

kbahey’s picture

I committed a fix for this to check the user's current balance against the threshold.

Check the new tarball that will be created 9 hours from now.

sbsimmons86’s picture

I appreciate it... I got it updated.. will let you know how it works.

Thanks

Sam

Status: Fixed » Closed (fixed)

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

mcfilms’s picture

Sorry to re-open this issue. But I realize this userpoints add-on module may be able to be modified to do what I need.

Is it possible to notify the USER when their own userpoints get BELOW a certain level?

I suppose the below part might be a bit tricky. But changing who to send the mail to seem to be doable.

I think all I'd need to do is change this section:

  // Get email address for user 1
  $admin = user_load(array('uid' => 1));
  $email = $admin->mail;

But to what I am not sure. The first line looks like it is getting user1. So maybe we don't need that. Maybe it is as simple as $email = $user->mail;

Would that line use the mail address of the user who has triggered this mail?

Thanks for any advice.