// in, but you should use isMember() if you want to find that out.
function isUserDataValid () {
// User id should not be zero so abort here
- if (getCurrentUserId() < 1) return false;
+ if (!isCurrentUserIdSet()) return false;
// Is the array there and filled?
return ((isset($GLOBALS['user_data'][getCurrentUserId()])) && (count($GLOBALS['user_data'][getCurrentUserId()]) > 1));
// Getter for current userid
function getCurrentUserId () {
// Userid must be set before it can be used
- if (!isset($GLOBALS['current_userid'])) {
+ if (!isCurrentUserIdSet()) {
// Not set
debug_report_bug('User id is not set.');
} // END - if
return $GLOBALS['current_userid'];
}
+// Checks if current userid is set
+function isCurrentUserIdSet () {
+ return isset($GLOBALS['current_userid']);
+}
+
// [EOF]
?>