From eedaa98921b57874a77ac7fd804158310a86273e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 22 Mar 2010 01:15:15 +0000 Subject: [PATCH] Need to unset is_userdata_valid state here to make logins in surfbar possible --- inc/wrapper-functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.5