$content['wernis_userid'] = 0;
// Are there some entries?
- if (fetchUserData(getUserId())) {
+ if (fetchUserData(getMemberId())) {
// Fetch id
$content['wernis_userid'] = getUserData('wernis_userid');
} // END - if
// And load all rows!
$result = SQL_QUERY_ESC("SELECT `id`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type` FROM `{?_MYSQL_PREFIX?}_user_wernis` WHERE `userid`=%s ORDER BY `wernis_timestamp` DESC",
- array(getUserId()), __FILE__, __LINE__);
+ array(getMemberId()), __FILE__, __LINE__);
// Load all rows
$content['rows'] = ''; $SW = 2;
}
} elseif ((getRequestElement('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) {
// Get total points and check if the user can request a payout
- $points = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points');
+ $points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
// Remove the registration fee
$points = $points - getConfig('points_register');
$content['wernis_userid'] = '';
// Are there some entries?
- if (fetchUserData(getUserId())) {
+ if (fetchUserData(getMemberId())) {
// Fetch id
$content['wernis_userid'] = getUserData('wernis_userid');
} // END - if
} elseif ((getRequestElement('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) {
// Get total points for just displaying them
- $points = countSumTotalData(getUserId(), 'user_points', 'points') - countSumTotalData(getUserId(), 'user_data', 'used_points');
+ $points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
// Prepare data for the template
$content['points'] = translateComma($points);
WERNIS_ADD_FEES_TO_ARRAY($content);
// Get WDS66 id
- if (fetchUserData(getUserId())) {
+ if (fetchUserData(getMemberId())) {
// Fetch id
$content['wernis_userid'] = getUserData('wernis_userid');
} // END - if
$success = WERNIS_EXECUTE_WITHDRAW(postRequestElement('wernis_userid'), md5(postRequestElement('wds66_password')), postRequestElement('amount'));
if ($success === true) {
// Add it to this amount
- addPointsDirectly('wernis_withdraw', getUserId(), bigintval(postRequestElement('amount')));
+ addPointsDirectly('wernis_withdraw', getMemberId(), bigintval(postRequestElement('amount')));
// Update the user data as well..
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `wernis_userid`=%s WHERE `userid`=%s LIMIT 1",
- array(bigintval(postRequestElement('wernis_userid')), getUserId()), __FILE__, __LINE__);
+ array(bigintval(postRequestElement('wernis_userid')), getMemberId()), __FILE__, __LINE__);
// All done!
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE'));
$success = WERNIS_EXECUTE_PAYOUT(postRequestElement('wernis_userid'), postRequestElement('amount'));
if ($success === true) {
// Sub points
- subtractPoints('wernis_payout', getUserId(), postRequestElement('amount'));
+ subtractPoints('wernis_payout', getMemberId(), postRequestElement('amount'));
// Update WDS66 id
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `wernis_userid`=%s WHERE `userid`=%s LIMIT 1",
- array(bigintval(postRequestElement('wernis_userid')), getUserId()), __FILE__, __LINE__);
+ array(bigintval(postRequestElement('wernis_userid')), getMemberId()), __FILE__, __LINE__);
// All done!
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_DONE'));