Possible fix #2 for reflink
authorRoland Häder <roland@mxchange.org>
Thu, 5 Nov 2009 16:49:07 +0000 (16:49 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 5 Nov 2009 16:49:07 +0000 (16:49 +0000)
inc/functions.php
inc/wrapper-functions.php

index 64fb5c3a211c466035b40e7898cdcc9ca7b6b207..439827a0978e7b24ae29d76998b1204053d81c07 100644 (file)
@@ -3186,9 +3186,6 @@ function determineReferalId () {
                // Default is not found
                $found = false;
 
                // Default is not found
                $found = false;
 
-               // Set current userid here if no member
-               if (!isMember()) setCurrentUserId($GLOBALS['refid']);
-
                // Do we have nickname or userid set?
                if (isNicknameUsed($GLOBALS['refid'])) {
                        // Nickname in URL, so load the id
                // Do we have nickname or userid set?
                if (isNicknameUsed($GLOBALS['refid'])) {
                        // Nickname in URL, so load the id
index c7e4978ce06d380518dae021891ee4699ff816be..e9bd29b25ece037df65e7e7963af51f040d72b62 100644 (file)
@@ -738,8 +738,8 @@ function getUserDataArray () {
 // Checks if the user data is valid, this may indicate that the user has logged
 // in, but you should use isMember() if you want to find that out.
 function isUserDataValid () {
 // Checks if the user data is valid, this may indicate that the user has logged
 // in, but you should use isMember() if you want to find that out.
 function isUserDataValid () {
-       // User id should not be zero
-       if (getCurrentUserId() < 1) debug_report_bug(__FUNCTION__.': User id is zero.');
+       // User id should not be zero so abort here
+       if (getCurrentUserId() < 1) return false;
 
        // Is the array there and filled?
        return ((isset($GLOBALS['user_data'][getCurrentUserId()])) && (count($GLOBALS['user_data'][getCurrentUserId()]) > 1));
 
        // Is the array there and filled?
        return ((isset($GLOBALS['user_data'][getCurrentUserId()])) && (count($GLOBALS['user_data'][getCurrentUserId()]) > 1));