]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/beg_functions.php
Fixes/rewrites
[mailer.git] / inc / libs / beg_functions.php
index 53acc3a45d3af5a1fe8e9a31db8eeb0d8194570b..b3622839f1bbe93b30b84189018c7281b1bd16be 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -54,11 +54,11 @@ function addPointsBeg ($userid, $points) {
                // Add points to account
                // @TODO Try to rewrite the following unset()
                unset($GLOBALS['ref_level']);
-               $added = addPointsThroughReferalSystem('beg', $userid, $points, false, 0, strtolower(getBegMode()));
+               $added = addPointsThroughReferalSystem('beg', $userid, $points, false, 0, getBegMode());
        }
 
        // Subtract begged points from member account if the admin has selected one
-       if (getBegUserid() > 0) {
+       if (isValidUserId(getBegUserid())) {
                // Subtract from this account
                subtractPoints('beg_payout', getBegUserid(), $points);
        } // END - if