$REFS = 0;
// Load referal points
- $result_points = SQL_QUERY_ESC("SELECT `points`, `locked_points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1", array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
+ $result_points = SQL_QUERY_ESC("SELECT `points`, `locked_points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1", array(getMemberId(), bigintval($content['level'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_points) == 1) {
list($points, $locked) = SQL_FETCHROW($result_points);
// Also count locked points
// Load referal counts
$result_refs = SQL_QUERY_ESC("SELECT `counter` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `userid`=%s AND `level`='%s' LIMIT 1",
- array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
+ array(getMemberId(), bigintval($content['level'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_refs) == 1) {
list($REFS) = SQL_FETCHROW($result_refs);
$TREF += $REFS;
$content['rows'] = $OUT;
// Fetch user account
-if (!fetchUserData(getUserId())) {
+if (!fetchUserData(getMemberId())) {
// Something really bad happened
- debug_report_bug('User account ' . getUserId() . ' not found.');
+ debug_report_bug('User account ' . getMemberId() . ' not found.');
} // END - if
// Initialize variables