// Next are the users
foreach ($levelArray as $refid) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refid=' . $refid);
- // Add also this user's (maybe) missing levels
- addMissingReferralLevels($refid);
-
// Does the refid have an array?
if (isset($GLOBALS['referral_refid'][$refid])) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refid=' . convertNullToZero($refid) . ',count()=' . count($GLOBALS['referral_refid'][$refid]));
+ // Add also this user's (maybe) missing levels
+ addMissingReferralLevels($refid);
+
// Okay, then walk through here, too
foreach ($GLOBALS['referral_refid'][$refid] as $refLevel => $refArray) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refid=' . convertNullToZero($refid) . ',refLevel=' . $refLevel . ',count()=' . count($refArray));