2
$uid = isset($xoopsUser) ? $xoopsUser->getVar('uid') : 0;
Will ensure that you won't get a blank page if the page is accessed by an anonymous user
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."
Cusix Software