From: Roland Häder Date: Mon, 22 Mar 2010 01:15:15 +0000 (+0000) Subject: Need to unset is_userdata_valid state here to make logins in surfbar possible X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=eedaa98921b57874a77ac7fd804158310a86273e Need to unset is_userdata_valid state here to make logins in surfbar possible --- diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index e7ef273e79..e23913c49b 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -844,7 +844,11 @@ function isUserDataValid () { // Setter for current userid function setCurrentUserId ($userid) { + // Set userid $GLOBALS['current_userid'] = bigintval($userid); + + // Unset it to re-determine the actual state + unset($GLOBALS['is_userdata_valid'][$userid]); } // Getter for current userid @@ -861,7 +865,7 @@ function getCurrentUserId () { // Checks if current userid is set function isCurrentUserIdSet () { - return isset($GLOBALS['current_userid']); + return ((isset($GLOBALS['current_userid'])) && ($GLOBALS['current_userid'] > 0)); } // Checks wether we are debugging template cache