-$URL = 'modules.php?module=index';
-
-if (isValidUserId(determineReferalId())) {
- // Test if nickname or numeric id
- if (isExtensionActive('nickname')) {
- // Nickname in URL, so load the id
- fetchUserData(determineReferalId(), 'nickname');
-
- // Do we have an entry?
- if (isUserDataValid()) {
- // Load userid
- $GLOBALS['refid'] = getUserData('userid');
- } else {
- // So do we have a userid?
- fetchUserData(determineReferalId());
-
- // Do we have an entry?
- if (!isUserDataValid()) {
- // No entry, so no referal id
- $GLOBALS['refid'] = getConfig('def_refid');
- } // END - if
- }
- } // END - if