- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
- require($INC);
+ die();
+} // END - if
+
+// Add points in autopurge-mode
+function addPointsAutoPurge ($userid, $points) {
+ // Is the userid valid?
+ if (!isValidUserId($userid)) {
+ // Please report all these bugs
+ reportBug(__FUNCTION__, __LINE__, 'Invalid call. userid=' . $userid . ',points=' . $points);
+ } // END - if
+
+ // Add points over the ref system directly now
+ initReferralSystem();
+ addPointsThroughReferralSystem('autopurge_add', $userid, $points);
+
+ // Send out mail to user
+ $message = loadEmailTemplate('member_autopurge_points', array('points' => $points), $userid);
+ sendEmail($userid, '{--MEMBER_AUTOPURGE_SUBJECT--}', $message);