-} elseif ((getRequestElement('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) {
- // 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 - getConfig('points_register');
+} elseif ((getRequestParameter('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) {
+ // Get user's total points and remove the registration fee
+ $points = getTotalPoints(getMemberId()) - getPointsRegister();