// Is the cache from below functions different?
if (((isset($GLOBALS['getCurrentUserId'])) && ($GLOBALS['getCurrentUserId'] != $userid)) || ((!isset($GLOBALS['current_userid'])) && (isset($GLOBALS['isCurrentUserIdSet'])))) {
// Then unset both
- unset($GLOBALS['getCurrentUserId']);
- unset($GLOBALS['isCurrentUserIdSet']);
- unset($GLOBALS['isValidUserId'][$userid]);
+ unsetCurrentUserId();
} // END - if
// Set userid
return $GLOBALS[__FUNCTION__];
}
+// Unsets current userid
+function unsetCurrentUserId () {
+ // Do we have it set?
+ if (isset($GLOBALS['current_userid'])) {
+ // Unset this, too
+ unset($GLOBALS['isValidUserId'][$GLOBALS['current_userid']]);
+ } // END - if
+
+ // Unset all cache entries
+ unset($GLOBALS['current_userid']);
+ unset($GLOBALS['getCurrentUserId']);
+ unset($GLOBALS['isCurrentUserIdSet']);
+}
+
// Checks whether we are debugging template cache
function isDebuggingTemplateCache () {
// Do we have cache?