- foreach ($cacheArray['ref_system']['userid'] as $id => $u_id)
- {
- if (($u_id == $uid) && ($cacheArray['ref_system']['level'][$id] == 0))
- {
- foreach ($cacheArray['ref_depths']['level'] as $level)
- {
- if (($level == $cacheArray['ref_system']['level'][$id]) && ($level == 0))
- {
+ foreach ($cacheArray['ref_system']['userid'] as $id => $u_id) {
+ // Do we have a ref for this user?
+ //* DEBUG: */ echo "id={$id},u_id={$u_id},uid={$uid},old={$old},level={$cacheArray['ref_system']['level'][$id]}<br />\n";
+ if (($u_id == $uid) && ($cacheArray['ref_system']['level'][$id] == 1)) {
+ //* DEBUG: */ echo "uid matches!<br />\n";
+ foreach ($cacheArray['ref_depths']['level'] as $level) {
+ if (($level == $cacheArray['ref_system']['level'][$id]) && ($level == 1)) {