]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/payout_functions.php
mailer project continued:
[mailer.git] / inc / libs / payout_functions.php
index 7dea181c693d4411d0b977de9598bd8964e1884b..82c4048dea845405414c1f7d6b73475ffecb7626 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -99,7 +99,7 @@ function getPayoutPoints ($userid) {
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__][$userid])) {
                // Determine it
-               $GLOBALS[__FUNCTION__][$userid] = countSumTotalData($userid, 'user_points', 'points') - countSumTotalData($userid, 'user_data', 'used_points');
+               $GLOBALS[__FUNCTION__][$userid] = countSumTotalData($userid, 'user_points', 'points') - getUserUsedPoints($userid);
        } // END - if
 
        // Return it