]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/wernis_functions.php
'userid' rewritten to functions
[mailer.git] / inc / libs / wernis_functions.php
index 7d6f157c3b2f2b9c7efacd260867987fbd1fcd14..6febd51f6f050a9060bc91969a89f6f12bd4a2b1 100644 (file)
@@ -226,7 +226,7 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) {
        $result = false;
 
        // Prepare the purpose
-       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(WERNIS_API_PURPOSE_WITHDRAW, $GLOBALS['userid']))."\";";
+       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(WERNIS_API_PURPOSE_WITHDRAW, getUserId()))."\";";
        eval($eval);
 
        // Prepare the request data
@@ -267,7 +267,7 @@ function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) {
        $result = false;
 
        // Prepare the purpose
-       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), $GLOBALS['userid']))."\";";
+       $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), getUserId()))."\";";
        eval($eval);
 
        // Prepare the request data
@@ -327,7 +327,7 @@ function WERNIS_TRANSFER_STATUS ($status) {
 function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = "", $status = "") {
        // Register this wernis movement
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_wernis` (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
-               array($GLOBALS['userid'], bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__);
+               array(getUserId(), bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__);
 }
 
 // Take fees and factor
@@ -336,7 +336,7 @@ function WERNIS_TAKE_FEE ($points, $mode) {
        //* DEBUG: */ echo "mode={$mode},points={$points}<br />\n";
        if (!in_array($mode, array('payout', 'withdraw'))) {
                // Log error and abort
-               DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$GLOBALS['userid']},mode={$mode},points={$points}");
+               DEBUG_LOG(__FUNCTION__, __LINE__, "uid={getUserId()},mode={$mode},points={$points}");
                return false;
        } // END - if