- if (($payout > 0) && (!empty($payout))) {
- // Yes, he has.
- $target = "locked_points";
- } elseif ($payout == "0") {
- // No, he has not
- $target = "points";
- }
-
- // Add points...
- if (empty($payout)) {
- // ... to jackpot account
- ADD_JACKPOT($points);
- if (empty($jackpot)) $jackpot = 0;
- $jackpot += $points;
- } else {
- // .. to user's account
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth=0 LIMIT 1",
- array($target, $target, $points, bigintval($uid)), __FILE__, __LINE__);
+ // Send out mail to user
+ $message = loadEmailTemplate('member_autopurge_points', array('points' => $points), $userid);
+ sendEmail($userid, '{--AUTOPURGE_MEMBER_SUBJECT--}', $message);
+}