- // Get total points and check if the user can request a payout
- $points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
-
- // Remove the registration fee
- $points = $points - getPointsRegister();
+ // Get user's total points and remove the registration fee
+ $points = getTotalPoints(getMemberId()) - getPointsRegister();