// Default is not found
$found = false;
- // Set current userid here if no member
- if (!isMember()) setCurrentUserId($GLOBALS['refid']);
-
// Do we have nickname or userid set?
if (isNicknameUsed($GLOBALS['refid'])) {
// Nickname in URL, so load the id
// Checks if the user data is valid, this may indicate that the user has logged
// in, but you should use isMember() if you want to find that out.
function isUserDataValid () {
- // User id should not be zero
- if (getCurrentUserId() < 1) debug_report_bug(__FUNCTION__.': User id is zero.');
+ // User id should not be zero so abort here
+ if (getCurrentUserId() < 1) return false;
// Is the array there and filled?
return ((isset($GLOBALS['user_data'][getCurrentUserId()])) && (count($GLOBALS['user_data'][getCurrentUserId()]) > 1));