From: Roland Häder Date: Thu, 5 Nov 2009 16:49:07 +0000 (+0000) Subject: Possible fix #2 for reflink X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6d6e268d55fb9d9374475e12e2f66dca732ce1eb;p=mailer.git Possible fix #2 for reflink --- diff --git a/inc/functions.php b/inc/functions.php index 64fb5c3a21..439827a097 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3186,9 +3186,6 @@ function determineReferalId () { // 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 diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index c7e4978ce0..e9bd29b25e 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -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 () { - // 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));