// 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
// 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