Naming convention applied, new API function introduced:
[mailer.git] / inc / wrapper-functions.php
index da04d5ddccea5a9bacc6f1abb70f6daa2f6431a0..f5b412e696a66693b8e724bdfc97cbdf997a98a0 100644 (file)
@@ -1950,5 +1950,17 @@ function generateWrappedUserEmailLink ($email) {
        return generateEmailLink($email, 'user_data');
 }
 
+// Wrapper to check if user points are locked
+function ifUserPointsLocked ($userid) {
+       // Do we have cache?
+       if (!isset($GLOBALS[__FUNCTION__][$userid])) {
+               // Determine it
+               $GLOBALS[__FUNCTION__][$userid] = ((getFetchedUserData('userid', $userid, 'ref_payout') > 0) && (!isDirectPaymentEnabled()));
+       } // END - if
+
+       // Return cache
+       return $GLOBALS[__FUNCTION__][$userid];
+}
+
 // [EOF]
 ?>